Vetrijar Posted January 25, 2004 Posted January 25, 2004 I'm having problems creating a directory in asp.net on my local machine Dim folder As New System.IO.DirectoryInfo(Server.MapPath("\writehere") & ctl_username ) If Not folder.Exists Then folder.Create() with ctl_username being the name of the person. ex. c:\wwwroot\writehere\vetrijar\ would be the new directory. I get the error Access to the path "c:\inetpub\wwwroot\writehere\Ryan" is denied. the directory writehere i precreated already with the read/write enabled. Quote
Jarda Posted January 25, 2004 Posted January 25, 2004 Hi, did you check the ASP.NET write privileges? Please realize that .NET needs to have the privileges from the root (c:\) in case you want to create folders! Good luck Jarda ================== Jaroslav Lhotak Internet Team Radio Free Europe / Radio Liberty Inc. http://www.rferl.org/ Quote
Vetrijar Posted January 25, 2004 Author Posted January 25, 2004 I have the privilege set at the 'writehere' folder and all sub folders. is that right? Quote
Jarda Posted January 26, 2004 Posted January 26, 2004 Yeah, this should be fine. The user ASP.NET Machine Account has to have at the least read permissions (Read & Execute, List Folder Contents and Read) up to the this folder. Don't you have another rights which would block write access? Did you propagated these permissions on all subfolders correctly? Quote
Vetrijar Posted January 27, 2004 Author Posted January 27, 2004 I set the directories to read,exe,list,script. nothign still. Is there another way to create a folder than the one listed above? Quote
Vetrijar Posted January 27, 2004 Author Posted January 27, 2004 Found the Problem! In windows XP, the file sharing is set to 'simple' which didn't let me set the write/read/exe for ALL accounts (still don't know why i had to go through it this way). I had to first goto My Computer, then Tools, Then Folder Options, then View. Then scroll to the bottom and unselect the simple file sharing so it would give me a security tab. http://support.microsoft.com/default.aspx?scid=kb;EN-US;307874 Then I could right click on the folder, select security, and set the permissions for all the accounts. I had to set the USERS one to get it to work. http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B308418#7 Those are the microsoft.com links about it. thx for your help Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.