|
-
Jul 11th, 2005, 12:37 PM
#1
Thread Starter
Hyperactive Member
Directory.CreateDirectory
I am using this function to try and create a directory in my Web project folder .. using ASP.NET ..
System.IO.Directory.CreateDirectory(server.mappath("\test")) ..
No matter what path I give it always says "Access Denied to the path .." blah blah blah ..
What am I missing ??
-
Jul 11th, 2005, 01:09 PM
#2
PowerPoster
Re: Directory.CreateDirectory
Use a PHYSICAL Path instead of a Virtual Path.
Use:
Code:
system.IO.Directory.CreateDirectory(Request.PhysicalApplicationPath & "\test")
-
Jul 11th, 2005, 02:04 PM
#3
Re: Directory.CreateDirectory
The account that ASP.net is running under doesn't have "Create folders / append data" privileges to the parent folder (e.g. c:\ASP.Net, where you wish to create c:\ASP.Net\test). I suggest you investigate the minimum requirements (e.g. "Read" and "Write") and apply them to the ASP.net user (by default MACHINENAME/ASPNET
-
Jul 11th, 2005, 03:24 PM
#4
Thread Starter
Hyperactive Member
Re: Directory.CreateDirectory
 Originally Posted by axion_sa
The account that ASP.net is running under doesn't have "Create folders / append data" privileges to the parent folder (e.g. c:\ASP.Net, where you wish to create c:\ASP.Net\test). I suggest you investigate the minimum requirements (e.g. "Read" and "Write") and apply them to the ASP.net user (by default MACHINENAME/ASPNET
How do you apply those permissions to ASPNET user ??
-
Jul 12th, 2005, 12:16 PM
#5
Re: Directory.CreateDirectory
Via Windows Explorer - stock standard NTFS permissions
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|