FIX: You cannot create Web projects on Windows Server 2003 in Visual Studio .NET 2002

This article was previously published under Q327283
This article has been archived. It is offered "as is" and will no longer be updated.
When you use Visual Studio .NET 2002 to create a new Web project, and you connect to Microsoft Windows Server 2003 as the Web server, a Web Access Failed dialog box appears and 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/WebApplication1' cannot be opened with the path 'c:\inetpub\wwwroot\WebApplication1'. The error returned was:

Unable to create web project 'WebApplication1'. The file path 'c:\inetpub\wwwroot\WebApplication1' does not correspond to the URL 'http://localhost/WebApplication1'. The two need to map to the same server location. HTTP Error 404: Not Found
This problem occurs because Microsoft Internet Information Services 6.0 (IIS) blocks all file name extensions that are not explicitly mapped. By default, the .tmp file name extension is not mapped on IIS 6.0 for security reasons.

During the process of creating a Web project, Visual Studio .NET 2002 tests to confirm that the URL and the UNC path match. To do this, Visual Studio .NET writes a file that has the .tmp file name extension to the server, and then requests this file from the server through an http request. Because the .tmp file name extension is not mapped on IIS 6.0, IIS returns HTTP Error 404. This causes Visual Studio .NET to return the error message described in the "Symptoms" section.

Note This problem does not occur when you use Visual Studio .NET 2003 because this version uses a file that has the .htm file name extension for this process.

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft Visual Studio .NET 2002. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
837234 List of bugs that are fixed in Visual Studio .NET 2002 Service Pack 1
There are three workarounds for this problem:
  • Workaround 1
    Use Visual Studio .NET 2003 when you create projects on Windows 2003 Server. This is the recommended workaround. It is a good idea to use this version if your production computer is connected to the Internet because mapping the .tmp file name extension can be a security risk.
  • Workaround 2
    If security is not an issue (for example, if you are using a standalone, development computer), follow these steps to map the .tmp file name extension:

    1. Start the Internet Information Services MMC.
    2. Right-click your Web site, and then click Properties.
    3. Click the HTTP Headers tab, and then click MIME Types.
    4. Click New to add a new MIME type.
    5. In the Extensions text box, type .tmp.
    6. In the MIME type text box, type text/plain.
  • Workaround 3
    Install the hotfix that is in the following article in the Microsoft Knowledge Base:
    831210 FIX: Cannot Create Web Projects on Windows Server 2003
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This problem was corrected in Microsoft Visual Studio .NET 2002 Service Pack 1.

Steps to Reproduce the Behavior

  1. Start Visual Studio .NET 2002. On the File menu, point to New, and then click Project.
  2. For the project type, click ASP.NET Web Application.
  3. In the Location text box, specify a computer running Windows 2003 that does not have the .tmp file name extension mapped.
  4. Click OK.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
240225 Description of Adsutil and MetaEdit Utilities Used to Modify the Metabase

Article ID: 327283 - Last Review: 12/07/2015 12:09:07 - Revision: 3.1

Microsoft Visual Studio .NET 2002 Professional Edition, Microsoft Visual Studio .NET 2002 Enterprise Architect, Microsoft Visual Studio .NET 2002 Enterprise Developer

  • kbnosurvey kbarchive kbvs2002sp1fix kbvs2002sp1sweep kbpending kbbug KB327283