Article ID: 326497
Article Last Modified on 7/8/2003
APPLIES TO
- Microsoft ASP.NET 1.1
- Microsoft Visual Studio .NET 2003 Academic Edition
- Microsoft Visual Studio .NET 2003 Enterprise Architect
- Microsoft Visual Studio .NET 2003 Enterprise Developer
- Microsoft Visual Studio .NET 2003 Professional Edition
- Microsoft ASP.NET 1.0
- Microsoft Visual Studio .NET 2002 Academic Edition
- Microsoft Visual Studio .NET 2002 Enterprise Architect
- Microsoft Visual Studio .NET 2002 Enterprise Developer
- Microsoft Visual Studio .NET 2002 Professional Edition
This article was previously published under Q326497
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:
If you click Cancel, you receive the following error message:
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:
If you click OK, the project is not open.
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).
RESOLUTION
To open the Web project with Visual Studio .NET, follow these steps:
- 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.
- Open the WebInfo file (
Projectname
.vbproj.webinfo orProjectname.csproj
.webinfo) with any text editor, such as Notepad. The WebInfo file is part of the application content. - Make the URLPath attribute the location of the project file (for example, http://localhost/
Test
/test
.vbproj or http://localhost/Test/test.csproj). - Save the WebInfo file.
- 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.
STATUS
This behavior is by design.
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.
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:
Keywords: kberrmsg kbprb kbconfig KB326497