Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Permission denied creating directory

Reply
Thread Tools

Permission denied creating directory

 
 
=?Utf-8?B?Q2hyaXN0b2ZmZXIgU8O4cmVuc2Vu?=
Guest
Posts: n/a
 
      06-21-2004
Hi,

I have a created a simple file upload asp.net web page which also creates directories on the fly using the following code:

string fullpath = Server.MapPath(".\\..\\..\\" + path);
DirectoryInfo dir = new DirectoryInfo(fullpath);
if(!dir.Exists)
dir.Create();

Now the dir.Create() statement gives me a permission denied. The ASP.NET user has been giving full control to the directory and in IIS Admin the directory has write permissions for scripts set. There is no problem in uploading the file to an already created directory which I find extremely weird!

What goes wrong ?

My OS is Windows XP using .NET framework 1.1. All the latest security patches are installed.
 
Reply With Quote
 
 
 
 
Scott Allen
Guest
Posts: n/a
 
      06-21-2004
Hi Christoffer:

One way to trouble shoot these types of problems is to enable auditing
and find out "who" is getting the access denied message.

See:
http://www.pluralsight.com/keith/boo...eauditing.html
and
http://www.pluralsight.com/keith/boo...ileaccess.html

Also, make sure the permissions apply to subfolders - click "Advanced"
and check the "Apply To" column.

HTH,

--
Scott
http://www.OdeToCode.com

On Mon, 21 Jun 2004 08:25:40 -0700, Christoffer Sørensen
<(E-Mail Removed)> wrote:

>Hi,
>
>I have a created a simple file upload asp.net web page which also creates directories on the fly using the following code:
>
>string fullpath = Server.MapPath(".\\..\\..\\" + path);
>DirectoryInfo dir = new DirectoryInfo(fullpath);
>if(!dir.Exists)
> dir.Create();
>
>Now the dir.Create() statement gives me a permission denied. The ASP.NET user has been giving full control to the directory and in IIS Admin the directory has write permissions for scripts set. There is no problem in uploading the file to an already created directory which I find extremely weird!
>
>What goes wrong ?
>
>My OS is Windows XP using .NET framework 1.1. All the latest security patches are installed.


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2hyaXN0b2ZmZXIgU8O4cmVuc2Vu?=
Guest
Posts: n/a
 
      06-22-2004
"Scott Allen" wrote:

> One way to trouble shoot these types of problems is to enable auditing
> and find out "who" is getting the access denied message.
> See:
> http://www.pluralsight.com/keith/boo...eauditing.html
> and
> http://www.pluralsight.com/keith/boo...ileaccess.html


Thanks for these links.

> Also, make sure the permissions apply to subfolders - click "Advanced"
> and check the "Apply To" column.


I have found what the problem was. The ASPNET user I added was from another domain. Now I have added the local ASPNET user and it works.

The audit thing really helped. Thank you very much!

Kind regards,

Christoffer Sørensen
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission denied creating Singleton in GLOBAL.ASA Tony Proctor ASP General 9 10-20-2007 11:45 AM
Problem Creating Socket : Permission Denied vivekian Perl Misc 1 08-22-2007 08:04 PM
Telerik "Error Creating Control", Virtual Directory Listing Denied Light ASP .Net 1 03-22-2006 01:11 PM
wildcard extension ASP.Net httphandler gives 401.3 ACL permission denied error on a directory Ken Yee ASP .Net 2 10-07-2005 04:03 PM
wildcard extension ASP.Net httphandler gives 401.3 ACL permission denied error on a directory Ken Yee ASP .Net Security 2 10-07-2005 04:03 PM



Advertisments