Microsoft Knowledge Base Article
This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved.
Terms
of Use |
Trademarks
Article ID: 316721 - Last Review: February 23, 2007 - Revision: 4.8
PRB: "Failed to Start Monitoring Directory Changes" Error Message When You Browse to ASP.NET Page
This article was previously published under Q316721
When you browse to an ASP.NET (.aspx) page, you may receive
the following error message
Access denied to
'C:\Inetpub\Wwwroot' directory. Failed to start monitoring directory changes.
with the stack trace:
[HttpException (0x80004005): Access denied to 'C:\Inetpub\Wwwroot' directory.Failed to start monitoring directory changes.]
System.Web.NativeDirMonCompletion..ctor(String dir, Boolean watchSubtree,
Boolean renamesOnly, NativeFileChangeNotification callback)
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)
Alternatively, you may receive the following error
message
Server cannot access application directory
'C:\Inetpub\Wwwroot\Virtual Directory Name\'. The
directory does not exist or is not accessible because of security settings.
with the stack trace:
[HttpException (0x80004005): Server cannot access application directory
'C:\Inetpub\Wwwroot\Virtual Directory Name.
The directory does not exist or is not accessible because of security settings.]
System.Web.HttpRuntime.EnsureAccessToApplicationDirectory()
System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
[HttpException (0x80004005): ASP.NET Initialization Error]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context)
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
By design, in
Microsoft Windows 2000 and in Microsoft Windows XP, ASP.NET requires read,
execute, and list access for the ASPNET account (the Aspnet_wp.exe process
account) on the root Web site or on any virtual directory. Similarly,
in Microsoft Windows Server 2003, ASP.NET requires read, execute, and list access for the
NETWORK SERVICE account (the W3wp.exe process account) on the root Web site or
on any virtual directory. This is necessary so that
ASP.NET can access the content files and can monitor file changes.
To add read, execute, and list access for the ASPNET
account on the root Web site or on any virtual directory, follow these steps:
- In Windows Explorer, browse to the folder that contains the
root Web site (which is C:\Inetpub\Wwwroot by default) or the virtual
directory.
- Right-click the folder, and then click
Properties.
- On the Security tab, click
Add.
- Type
ComputerName\ASPNET (for
example, on a computer named Webdev, type
Webdev\ASPNET), and then click
OK.
- Allow the following permissions for the ASPNET account:
- Read & Execute
- List Folder Contents
- Read
- Click OK to close the
Properties dialog box and to save the changes.
NOTE: You do not need to perform these steps if the Everyone group or
the Users group has read access to the root Web site or virtual directory.
If you receive either of the error messages that are listed
in the "Symptoms" section but your stack trace differs from the stack traces in
the "Symptoms" section, the cause for your error message may be different.
For additional information, click the following article number to view the
article in the Microsoft Knowledge Base:
317955Â
(http://kbalertz.com/Feedback.aspx?kbNumber=317955/EN-US/
)
FIX: "Failed to Start Monitoring Directory Changes" Error Message When You Browse to an ASP.NET Page
For additional information about ASP.NET security
issues on a domain controller, click the article number below to view the
article in the Microsoft Knowledge Base:
315158Â
(http://kbalertz.com/Feedback.aspx?kbNumber=315158/EN-US/
)
PRB: ASP.NET Does Not Work with a Non-Administrator Domain Account on a Domain Controller
APPLIES TO
- Microsoft ASP.NET 1.1
- Microsoft ASP.NET 1.0
| kbconfig kbhttpruntime kbprb kbsecurity kbwebforms KB316721 |
Community Feedback System
Very often, it takes hours to solve a problem. Very often, you've looked high
and low, and have tried a lot of solutions. When you finally found it, chances
are, it was because someone else helped you. Here's your chance to give back.
Use our community feedback tool to let others know what worked for you and what
didn't.
Please also understand that the community feedback system is not warranted to be
correct, it's simply a system that we've built to let people try and help each
other. If something in a feedback response doesn't make sense to you, or you're
not comfortable making changes that the feedback talks about (like registry
edits), please consult a professional.
Thank you for using kbAlertz.com Feedback System.
-- Scott Cate