Failed to start monitoring file changes
Recently, I set up a virtual directory for an ASP.NET File Upload application.
The application was a sample application zipped in a .zip file. I extracted the application to a folder. Then I pointed the folder where the source files are located as the Local Path of the virtual directory that I have defined by the IIS manager. The ASP.NET version property of the virtual directory was originally set to 1.1.4322 on the Properties screen of the directory which I have opened by using the IIS management console.
When I browsed the fiel upload application by calling the default URL of this web application, I got the following error message.
Server Error in '/FileUpload' Application.
Access denied to 'C:\Inetpub\wwwroot\FileUpload\'. 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\FileUpload\'.
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:
|
Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032
Just as similar to incident with "Failed to initialize the AppDomain" which I wrote about at Failed to initialize the AppDomain, the "Access denied to" exception make me think about the security permission on the application folder.
I opened the root folder of the virtual site FileUpload and right click to open the context menu.
Then select Properties from the menu and navigate to Security tab.
I noticed that the ASP.NET Machine Account is not listed in the Group or user names area, add the ASP.NET user of the web server with read permissions.
After the read permissions are given to ASPNET user of the server, I can browse the site successfully.