Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2005

Tip: Looking for answers? Try searching our database.

Virtual directory error: "directory does not exist or is not accessible because of security settings"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dave - 23 Oct 2005 09:41 GMT
I am getting te following error in a ASP.Net app that is running on Win XP
Pro (SP2):

Server cannot access application directory 'C:\Documents and
Settings\dave\My Documents\My Visual Studio ASP.NET\MyWebSite\'. The
directory does not exist or is not accessible because of security settings.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Server cannot access
application directory 'C:\Documents and Settings\dave\My Documents\My Visual
Studio ASP.NET\MyWebSite\'. The directory does not exist or is not
accessible because of security settings.

The application is in a virtual directory called DotNet.

ASP.Net apps that I create directly in the wwwwroot folder display without
error.  It is only in the virtual directory that I am having problems with
permissions.

I turned directory browsing on and I can see the contents of the virtual
directory root (//DELL9/dotnet/) but I cannot see the contents of the web
app (//DELL9/dotnet/MyWebSite) i.e. I get the above error when I try to
browse.

I tried adding the user ASPNET to the security settings for the folder at
'C:\Documents and Settings\dave\My Documents\My Visual Studio
ASP.NET\MyWebSite' but this does not work either.

What do I need to do to set permissions for the virtual directory?
Steven Cheng[MSFT] - 24 Oct 2005 03:05 GMT
Hi Dave,

Welcome to ASPNET newsgroup.
From your description, the error you encountered is likely caused by the
asp.net application's physical path. Since ASP.NET application is a service
app which running in a non-interactive session, so it won't be able to
access those resources that are user specific. So for your scenario, I'd
suggest you move the application out of the   "Document settings..." and
its sub dir, put them into a normal public location like:

d:\folders...   or just beneath  "inetpub\wwwroot...."

Also, to get the exact cause of the accessing problem, you can consider
using filemon to trace the file accessing during your application's startup.

Thanks,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Dave" <davefrick@newsgroup.nospam>
| Subject: Virtual directory error: "directory does not exist or is not
accessible because of security settings"
| Date: Sun, 23 Oct 2005 01:55:18 -0700
| Lines: 40
[quoted text clipped - 8 lines]
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP14.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:133305
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
[quoted text clipped - 30 lines]
|
| What do I need to do to set permissions for the virtual directory?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.