Groups | Blog | Home
all groups > asp.net > december 2005 >

asp.net : Access denied to path


Joshua Flanagan
12/14/2005 6:20:49 PM
Is D:\ a mapped network drive? If so, the access attempt will be made by
domain\machinename$ - NOT the local ASPNET account. Search around for
information about ASP.NET and impersonation across network boundaries.


[quoted text, click to view]
fanto
12/14/2005 11:43:12 PM
Hi everyone,

I'm new to asp.net and would really appreciate some help. Not too sure where
this post should be so sorry if it's in the wrong place.

i'm trying to upload files to a server with the following method:
myFile.PostedFile.SaveAs(Server.MapPath("upload") & strFileNameOnly)

I've changed the permissions to allow aspnet to r/w/mod the folder but it
keeps on throwing the message:
Access to path 'D:\...\upload' is denied.

I've looked through some of the other posts with similar problems with no
luck. Tearing my hair out at this stage.

If any more information is need please let me know.

Thanks,
fanto
12/15/2005 12:49:49 AM
cheers for the quick reply,

i'm just running asp.net on my own computer at the moment, so as far as I
know its not a mapped network drive simply a hd on my machine (is this right?
as I said I'm new to this).

i've tried <identity impersonate="false" /> and <identity impersonate="true"
/> in the web.config file, and I don't have any user accounts on the site.

have I missed your point or am I doing something else wrong?

thanks again...

[quoted text, click to view]
fanto via DotNetMonster.com
12/15/2005 9:47:38 AM
anyone else have any ideas? where am I going wrong??


[quoted text, click to view]

--
Message posted via DotNetMonster.com
Joshua Flanagan
12/15/2005 11:23:35 AM
Ok, if it is a local HD, its not the problem I mentioned previously.

I think you also need to give ASPNET access to the root of the drive
(not just the subfolder). So trying giving at least Read access to D:\.

This article should tell you all of the rights that ASPNET requires:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT01.asp

Hope that helps.

Joshua Flanagan
AddThis Social Bookmark Button