[ArgumentNullException: Value cannot be null.
Parameter name: path2]
System.IO.Path.Combine(String path1, String path2)
System.Web.FilePathParse..ctor(String path, Boolean isFile, Boolean getShortNames)
System.Web.FileChangesMonitor.StartMonitoringDirectoryRenamesAndBinDirectory(String dir, FileChangeEventHandler callback)
[HttpException (0x80004005): ASP.NET Initialization Error]
Some of the files that ASP.NET monitors are:
- Web.config files
- Machine.config file
- Bin directory of an ASP.NET application
- Cache dependency files
- 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.
Workaround 1Make sure that all of the directory names in the hierarchy of that file path are less than nine characters long. For example:
Workaround 2Grant 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.
- 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).
- Click View/Edit.
- Make sure that you grant only the List Folder/Read Data permission.
Article ID: 320117 - Last Review: Jul 14, 2008 - Revision: 1