Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Assigning permission for aspnet user to web directory folder

Assigning permission for aspnet user to web directory folder

Scheduled Pinned Locked Moved ASP.NET
asp-netsecurityhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tprakash
    wrote on last edited by
    #1

    I have a web application. It has a folder named "data" under the project dir. My web application creates files in "data" folder. I know in order to create file in "data" folder, aspnet should have permission. For that we have to go to property of the web application folder. There under the tab Security ,press Add button.A form appears Write aspnet to the textbox and press ok. Then press checkbox to give full control to aspnet user. It works fine when developing. My problem is : when I create a web installation package of that application and install it to my client computer, I have to repeat above procedure. Is there any way to assign aspnet user full control of the folder "data" ? I mean without repeating above procedure, could I dynamically/programmatically assign full access over the "data" folder to aspnet user? :) Any information is highly appreciated? Thanks for you valuable comments. prakash

    M 1 Reply Last reply
    0
    • T tprakash

      I have a web application. It has a folder named "data" under the project dir. My web application creates files in "data" folder. I know in order to create file in "data" folder, aspnet should have permission. For that we have to go to property of the web application folder. There under the tab Security ,press Add button.A form appears Write aspnet to the textbox and press ok. Then press checkbox to give full control to aspnet user. It works fine when developing. My problem is : when I create a web installation package of that application and install it to my client computer, I have to repeat above procedure. Is there any way to assign aspnet user full control of the folder "data" ? I mean without repeating above procedure, could I dynamically/programmatically assign full access over the "data" folder to aspnet user? :) Any information is highly appreciated? Thanks for you valuable comments. prakash

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      There are a couple of options that you can use in a custom action to set the permission to a folder for the ASPNET account: + Use the tool cacls.exe + Use the DirectorySecurity class. + Use WMI.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups