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.

PRB: "Unable to Open Web Project" Error Message If the Web Project Is Moved to Another Computer


View products that this article applies to.

Symptoms

If you use Microsoft Visual Studio .NET to open a solution file (.sln), and the solution file contains a Web project that was developed on a computer other than the computer that you are currently working on, you receive the following error message:
The default Web access mode for this project is set to file share, but the project folder at http://LocalHost/ProjectName cannot be opened with the path 'filepath. The error returned was:

Unable to open Web project projectname. The Web projectname located on server http://localhost does not exist.

What would you like to do?

Retry using a different file share path

Try to open the project with FrontPage Server Extensions

Work offline
If you click Cancel, you receive the following error message:
Unable to open Web project projectname. The Web projectname located on server http://localhost does not exist.
After Visual Studio .NET opens the solution file, the project is marked unavailable.

However, if you try to directly open the Web project file (.csproj or .vbproj) instead of the solution file, you receive the following error message:
Unable to open Web project projectname. The file path filepath does not correspond to the URL http://Localhost:/projectname. The two must map to the same server location. HTTP Error 404: Object Not Found.
If you click OK, the project is not open.

↑ Back to the top


Cause

This behavior may be caused by incorrect configuration of the project or of the virtual directory on the target computer (the computer on which you are trying to open the project files and the solution files).

↑ Back to the top


Resolution

To open the Web project with Visual Studio .NET, follow these steps:
  1. In Internet Services Manager, create a virtual directory (named "Test," for example). This virtual directory must point to the folder that contains the application content, including the project file.

    For more information, see the "References" section of this article.
  2. Open the WebInfo file (Projectname.vbproj.webinfo or Projectname.csproj.webinfo) with any text editor, such as Notepad. The WebInfo file is part of the application content.
  3. Make the URLPath attribute the location of the project file (for example, http://localhost/Test/test.vbproj or http://localhost/Test/test.csproj).
  4. Save the WebInfo file.
  5. Use Visual Studio .NET to open the project file (.csproj or .vbproj), and then save the new solution.
NOTE: Steps 2, 3, and 4 can be circumvented. To circumvent these steps, create a virtual directory structure that mimics the structure of the computer on which the Web project was developed. For example, if the project name is MyApp, and the project is located two levels below the Default Web Site in Microsoft Internet Information Server (IIS) in the virtual directory named MyApp (/Apps/DB/MyApp), you must re-create this structure on the local IIS computer.

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


More information

The WebInfo file (Projectname.csproj.webinfo or Projectname.vbproj.webinfo) is part of the project content created by Visual Studio .NET. The WebInfo file keeps track of the virtual root location of a project. It contains a URL whose path specifyies the location of the project files.

↑ Back to the top


References

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
172138 HOW TO: Create a virtual directory in Internet Information Services (IIS)
For information about team development with Visual Studio .NET and Visual SourceSafe, visit the following MSDN Web site:

↑ Back to the top


Keywords: kbconfig, kberrmsg, kbprb, KB326497

↑ Back to the top

Article Info
Article ID : 326497
Revision : 8
Created on : 7/8/2003
Published on : 7/8/2003
Exists online : False
Views : 530