posts - 380, comments - 634, trackbacks - 117,
Dan Bartels online engineering logbook... Items that I find useful organized for my use, and indexed by google for yours. Here you can find information about Microsoft C# programming, SQL SERVER 2005, Telligent Systems CommunityServer, Dot Net Nuke, Windows Vista / Longhorn, and just about anything else that would compel me to type.

News

What I am Reading:


Professional Community Server

Past books can be viewed on:

Post Categories

Archives

Coding Techniques

Coding Tools

Community Sites

Deal Finders

Friends Businesses

Microsofties

Smartphones

Utilities

my blogmap
ERROR: The directory does not exist or is not accessible because of security settings

Setting up web virtual directories in locations like \My Documents\My Visual Studio Project\ProjectX can result in an errormessage like the ones below....  This is due to the fact that ASP.NET needs to be able to inspect for things like the web.config file...  In my experience this is a permissions issue...  Logic would dictate that you need to go give your asp.net user account access to the folder...  The key is that in Windows 2003 and Longhorn, this account is named "NETWORK SERVICE" (Sometimes we forget this =)

Server cannot access application directory 'C:\Inetpub\wwwroot\ASPNET Testing\'. 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:\Inetpub\wwwroot\ASPNET Testing\'. The directory does not exist or is not accessible because of security settings.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[HttpException (0x80004005): Server cannot access application directory 'C:\Inetpub\wwwroot\ASPNET Testing\'. The directory does not exist or is not accessible because of security settings.]
   System.Web.HttpRuntime.EnsureAccessToApplicationDirectory() +72
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +263

[HttpException (0x80004005): ASP.NET Initialization Error]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +983
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +128

OR this:

Access denied to 'c:\inetpub\wwwroot\'. Failed to start monitoring file changes.
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: Access denied to 'c:\inetpub\wwwroot\'. Failed to start monitoring file changes.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[HttpException (0x80070005): Access denied to 'c:\inetpub\wwwroot\'. Failed to start monitoring file changes.]
   System.Web.DirMonCompletion..ctor(DirectoryMonitor dirMon, String dir, Boolean watchSubtree, UInt32 notifyFilter) +139
   System.Web.DirectoryMonitor.StartMonitoring() +42
   System.Web.DirectoryMonitor.StartMonitoringFile(String file, FileChangeEventHandler callback, String alias) +154
   System.Web.FileChangesMonitor.StartMonitoringDirectoryRenamesAndBinDirectory(String dir, FileChangeEventHandler callback) +278
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +331

[HttpException (0x80004005): ASP.NET Initialization Error]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +983
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +128

Published Friday, April 22, 2005 10:14 PM by DanB

Filed under
::

Comments

# re: ERROR: The directory does not exist or is not accessible because of security settings @ Saturday, July 09, 2005 8:21 AM

FYI, you also are going to want to add the IUSR_[Machine Name] account to the permissions list on the folder... If you want to enable anonymous browsing. Read access is usually sufficient for this account....

You might want to also go to the root of your site, and under security, check advanced, and check "Replace Permissions On Child Objects"

Note you should only change permissions on web based folders on your local system, or if you know exactly what you are doing... I don't recommend doing this on a production site, as you could enable some gaping security holes...

Under some circumstances it is OK to give the "Network Service" group full control of a directory, but you should NEVER give the IUSR account this level of access in a production setting...

Dan

DanB

# re: ERROR: The directory does not exist or is not accessible because of security settings @ Tuesday, February 14, 2006 9:23 PM

just add "everyone" to the folder security list and grand access to them

grammton cleric

# re: ERROR: The directory does not exist or is not accessible because of security settings @ Saturday, March 11, 2006 3:03 PM

Thanks for the solution - just what I needed for a dev process.  

Brandon

# To directory does not exist. Create C:/xatshow/ ? @ Sunday, November 11, 2007 6:16 PM

I'm trying to make a slideshow to CD/DVD but when i press the create button, its came out like " to directory does not exist. Create C:/xatsow/ ? "

Could someone please....... help me with this :)

Thanks so much...........

Kevin Tev

# re: ERROR: The directory does not exist or is not accessible because of security settings @ Thursday, August 13, 2009 2:52 PM

when i want to enter in to the wat(Web Site Administration Tool )and select security to change my authentication(from windows to forms) and create roles,rules....it doesn't let me and gives me this error:

There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Server cannot access application directory '...'. The directory does not exist or is not accessible because of security settings.

what should I do?

please help me

Thank so much

asal

Leave a Comment

(required) 
(required) 
(optional)
(required) 
 
Powered by Community Server (Commercial Edition), by Telligent Systems
powered by god (with a little help from Telligent Systems - Community Server 2.1)