Failed to Start Monitoring Directory Changes
From: Jeff Reed (anonymous_at_discussions.microsoft.com)
Date: 02/15/04
- Next message: Rick Strahl [MVP]: "Re: Change Presentation of Databound Field"
- Previous message: Rob Kellow: "Re: Calling MS Applications from an ASP.NET page"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 14 Feb 2004 21:51:05 -0800
I am experiencing the the problem outlined the below. Unfortunately, I am using WinXP and I not sure if I can apply the solution due to lack of security control.
Any feed back would be apreciated.
http://support.microsoft.com/default.aspx?scid=kb;EN-US;317955
FIX: "Failed to Start Monitoring Directory Changes" Error Message When You Browse to an ASP.NET Page
View products that this article applies to.
This article was previously published under Q317955
SYMPTOMS
When you browse to an ASP.NET (.aspx) page, you may receive one of the following error messages:
Access denied to 'D:\MyWeb\Users\MainDirectory\MyApplication\' directory. Failed to start monitoring directory changes.
-or-
Access denied to 'D:\MyWeb\Users\MainDirectory\MyApplication\SamplePage.aspx'. Failed to start monitoring file changes.
For more information about the call stack traces that are associated with each of these error messages, see the "More Information" section.
CAUSE
To detect file changes, the process identity and the impersonated user identity must have specific permissions to all of the directories in the hierarchy of the file path for the file that ASP.NET is monitoring if any of the directories in that hierarchy have more than eight characters in their names.
Some examples of the files that ASP.NET monitors are as follows:
Web.config files
Machine.config files
Files in the Bin directory of an ASP.NET application
Cache dependency files
You receive the first error message if the Aspnet_wp.exe process identity (the ASPNET account by default) does not have permissions on at least one of the directories in the hierarchy of that file path.
You receive the second error message if the impersonated account does not have permissions on at least one of the directories in the hierarchy of that file path.
RESOLUTION
Use either of the following methods to resolve this problem.
Method 1
Make sure that all of the directory names in the hierarchy of that file path are less than nine characters long.
For example:
C:\Web\Users\MainDir\Site1
Method 2
Grant the required permissions on all of the directories in that hierarchy to the ASP.NET process account (ASPNET by default) or to the impersonated account (if impersonation is turned on). To do this, follow these steps:
In Windows Explorer, browse to the application folder or to the virtual directory that contains the content (for example, D:\MyWeb\Users\MainDirectory\MyApplication).
Right-click the folder, and then click Properties.
On the Security tab, click Add.
Type ComputerName\ASPNET (for example, on a computer that is named Webdev, type Webdev\ASPNET), and then click OK. If impersonation is turned on, you must also add the impersonated accounts.
Allow the following permissions for the ASPNET account (and for the impersonated accounts if impersonation is turned on):
Read & Execute
List Folder Contents
Read
Click OK to close the Properties dialog box and to save the changes.
Repeat steps 2 through 6 for all of the folders in the hierarchy of the path. For example:
D:\MyWeb\Users\MainDirectory
D:\MyWeb\Users
D:\MyWeb
D:
If you want to grant more restrictive permissions to these folders, follow these steps after you complete step 5:
Click Advanced.
On the Permissions tab, click the permission entry for the ASPNET account (or another impersonated account), and then click Edit.
Click Clear All, and then click to select the Allow check box for the List Folder / Read Data permission.
NOTE: The application virtual directory (for example, D:\MyWeb\Users\MainDirectory\MyApplication) must have at least the permissions that are specified in step 5.
STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in ASP.NET (included with the .NET Framework) 1.1.
MORE INFORMATION
This is the call stack trace that is associated with the first error message in the "Symptoms" section:
[HttpException (0x80004005): Access denied to 'D:\MyWeb\Users\MainDirectory\MyApplication\' directory. Failed to start monitoring directory changes.]
System.Web.FileChangesMonitor.StartMonitoringDirectoryRenamesAndBinDirectory(String dir, FileChangeEventHandler callback)
System.Web.HttpRuntime.StartMonitoringDirectoryRenamesAndBinDirectory()
System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
This is the call stack trace that is associated with the second error message in the "Symptoms" section:
[HttpException (0x80004005): Access denied to 'D:\MyWeb\Users\MainDirectory\MyApplication\SamplePage.aspx'. Failed to start monitoring file changes.]
System.Web.FileChangesMonitor.StartMonitoringFile(String fileName, FileChangeEventHandler callback)
System.Web.Caching.CacheDependency.Init(String[] filenames, String[] cachekeys, CacheDependency dependency, DateTime start)
System.Web.Caching.CacheDependency..ctor(String filename, DateTime start)
System.Web.Caching.CacheDependency..ctor(String filename)
System.Web.Security.FileAuthorizationModule.OnEnter(Object source, EventArgs eventArgs)
System.Web.SyncEventExecutionStep.Execute()
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
If you receive one the error messages that are listed in the "Symptoms" section, but if the call stack trace is not the same, the cause of your error message may be different. In this case, see the articles in the "References" for more information.
- Next message: Rick Strahl [MVP]: "Re: Change Presentation of Databound Field"
- Previous message: Rob Kellow: "Re: Calling MS Applications from an ASP.NET page"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|