To work around this problem, use one of the following methods.
Workaround 1
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
Workaround 2
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
- Read
- 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).
- Click View/Edit.
- Make sure that you grant only the List Folder/Read Data permission.