Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

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/

Posted
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?
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...