File Change detection requires that the process identity and the impersonated user identity 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 of the files that ASP.NET monitors are:
Bin directory of an ASP.NET application
Cache dependency files
You receive this error message if all of the following conditions are true:
The root directory has more than eight characters.
The rest of the directories in the file path have less than nine characters.
The Aspnet_wp.exe process identity (the ASPNET account by default) or the impersonated account does not have permissions on the root directory in the hierarchy of that file path.
If the file path hierarchy does not match this condition exactly, you may receive a different error message. For more information, see the "References" section of this article.
To work around this problem, use one of the following methods.
Make sure that all of the directory names in the hierarchy of that file path are less than nine characters long. For example:
Grant the required permissions to the Aspnet_wp.exe process identity (the ASPNET account by default) on all of the directories in that hierarchy or the impersonated account (if impersonation is turned on).
To do this, follow these steps:
In Windows Explorer, locate the application folder or the virtual directory that contains the content (for example, D:\MyWebApplications\Users\Main\App1).
Right-click the root folder (MyWebApplications in this case), 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. Add the impersonated accounts if impersonation is turned on.
Grant the following permissions for the ASPNET account (and for the impersonated accounts if impersonation is turned on):
Read & Execute
List Folder Contents
Click OK to close the Properties dialog box and to save the changes.
If you have to grant more restrictive permissions to these folders, follow these steps after you complete step 4:
Click Advanced to access special permissions or advanced settings.
Click the Permissions tab, and then select the permission entry for the ASPNET (or other impersonated account).
Make sure that you grant only the List Folder/Read Data permission.
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.
If the error message that you receive is the same as the error message that is listed in the "Symptoms" section of this article, but the stack trace does not match the stack trace in the "Symptoms" section, the cause of your error message may be different. For more information, see the "References" section of this article.
For additional information about a different error message for the same cause, click the article number below to view the article in the Microsoft Knowledge Base:
316721 PRB: "Failed to Start Monitoring Directory Changes" Error Message When You Browse to ASP.NET Page
317955 BUG: "Failed to Start Monitoring Directory Changes" Error Message When You Browse to an ASP.NET Page
For additional information about the minimum permissions that you must grant to the ASPNET account to run your ASP.NET applications, click the article number below to view the article in the Microsoft Knowledge Base:
317012 INFO: Process and Request Identity in ASP.NET
For additional information about ASP.NET security, click the article number below to view the article in the Microsoft Knowledge Base: