PRB: Cannot Open Web Project from Source Control (327535)



The information in this article applies to:

  • Microsoft Visual SourceSafe 6.0c

This article was previously published under Q327535

SYMPTOMS

If you have multiple Web sites on a development computer (that use Microsoft Internet Information Services (IIS) host header names, DNS, IP, and other identifiers), and you try to open a file share solution from Source Control by using the Microsoft Visual Studio .NET IDE, the IDE prompts you for the URL to use for the development Web in the Set Project Location dialog box. If you select localhost (for example, http://localhost/TestProjest), and then continue, the IDE creates a folder in the default Web root folder, and then appends an _1 if the Web site already exists.

When you try to open the solution to a different Web (other than the default Web) on the server, you receive the following error message:
Unable to create Web project 'http://MySite.com/MyProject'. The UNC share '\\MySite.com\wwwroot$\MyProject' does not exist or you do not have access.
You cannot successfully create an instance of the solution on the Web server.

STATUS

This behavior is by design.

MORE INFORMATION

When you use the File Share access method, the Visual Studio .NET IDE tries to resolve a file share to the Wwwroot folder by using the computer name part of the HTTP URL. Because the host header name does not match the actual computer name, the IDE cannot generate a valid UNC path to the Web location.

WORKAROUND

To work around this behavior, use one of the following methods:
  • Use FrontPage Server Extensions to control the project as described in the non-isolated development model in the Team Development guide that is described in the "References" section of this article.
  • Log on to the development server and then create the projects locally by using the IP address and the port address (separated by a colon (":")) that correspond to the non-default development Web site (http://WebServerIP:Port.

    Note This method only works if you are logged on locally to the server.
  • Follow these steps:
    1. Use the IIS Management Console to create a new virtual root on the development server for each developer. For more information, visit the Team Development guide that is described in the "References" section of this article.
    2. In Microsoft Visual SourceSafe Explorer, use a "Get latest version" of the project on the virtual root directory of each developer.
    3. Have your developers open the project in Microsoft Visual Studio .NET on their development workstation. To do this, click Open Existing Project from Web on the File menu.

REFERENCES

For a complete description of the integration between Visual Studio .NET and ASP.NET applications under source code control, visit the following Microsoft Web sites:

Team Development with Visual Studio .NET and Visual SourceSafe
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/tdlg_rm.asp

For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

190008 HOW TO: Use Host Header Names to Host Multiple Sites from One IP Address in IIS 5.0


Modification Type:MajorLast Reviewed:9/18/2003
Keywords:kbprb KB327535