Failed to Start Monitoring Directory Changes

G

Guest

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;31795


FIX: "Failed to Start Monitoring Directory Changes" Error Message When You Browse to an ASP.NET Pag
View products that this article applies to
This article was previously published under Q317955
SYMPTOM
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.
CAUS
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 file
Machine.config file
Files in the Bin directory of an ASP.NET applicatio
Cache dependency file
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.
RESOLUTIO
Use either of the following methods to resolve this problem.
Method
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
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 & Execut
List Folder Content
Rea

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\MainDirector
D:\MyWeb\User
D:\MyWe
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
STATU
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 INFORMATIO
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.
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top