Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

BUG: "Server Error" error message when you run an ASP.NET application in offline mode by using Visual Studio IDE


View products that this article applies to.

Symptoms

When you upgrade the Microsoft .NET Framework from version 1.0 to 1.1, and then you try to run an ASP.NET application in Offline mode by using Microsoft Visual Studio IDE, you may receive the following error message:
Server Error in '/ComputerName_offline/ApplicationName' Application

Server cannot access application directory 'C:\Documents and Settings\Username\VSWebCache\ServerName\ApplicationName\'. The directory does not exist or is not accessible because of security settings.

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: Server cannot access application directory 'C:\Documents and Settings\Username\VSWebCache\ServerName\ApplicationName\'. The directory does not exist or is not accessible because of security settings.

↑ Back to the top


Cause

When you upgrade the .NET Framework 1.0 to the .NET Framework 1.1, the read permissions are not set for the ASPNET account on the \VSWebCache folder. On Microsoft Windows Server 2003, the read permissions are not set for the NETWORK SERVICE account.

↑ Back to the top


Workaround

To work around this bug, grant the ASPNET account read permissions to the \VSWebCache folder. On Windows Server 2003, grant the NETWORK SERVICE account read permissions to the \VSWebCache folder. To do this, follow these steps:
  1. In Windows Explorer, locate C:\Documents and Settings\Username.
  2. Right-click the VSWebCache folder, and then click Properties.
  3. On the Security tab, click Add.
  4. In the Select Users or Groups box, type Servername\ASPNET. On Windows Server 2003, type Servername\NETWORK_SERVICE in the Select Users or Groups box.
  5. Click OK.
  6. Make sure that the Read & Execute check box is selected, and then click OK.

↑ Back to the top


Status

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

↑ Back to the top


More information

Steps to Reproduce the Behavior

Create a New ASP.NET Web Application

  1. Start Microsoft Visual Studio .NET, and then create a new ASP.NET Web Application project by using Microsoft Visual C# .NET or Microsoft Visual Basic .NET. By default, WebForm1.aspx is created.
  2. On the Build menu, click Build Solution.
  3. On the Debug menu, click Start Without Debugging. Verify that the project works.

Set the Project to Work Offline and Then Test the Offline Project

  1. On the Project menu, point to Web Project, and then click Work Offline.
  2. On the Debug menu, click Start Without Debugging.

    You notice the error message that is mentioned in the "Symptoms" section of this article.

↑ Back to the top


References

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
816783� PRB: ASP.NET Applications Experience Unexpected Behavior After Upgrade

↑ Back to the top


Keywords: kbvs2002sp1sweep, kbbug, kbideproject, kbsetup, kbconfig, kbprb, KB825789

↑ Back to the top

Article Info
Article ID : 825789
Revision : 6
Created on : 7/28/2005
Published on : 7/28/2005
Exists online : False
Views : 592