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

D

Dave

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

Steven Cheng[MSFT]

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

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







--------------------
| From: "Dave" <[email protected]>
| 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
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: c-24-130-14-93.hsd1.ca.comcast.net 24.130.14.93
| 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
|
| 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?
|
|
|
|
|
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top