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.

You cannot open ASP.NET Web application project after deployment


View products that this article applies to.

Symptoms

You create an ASP.NET Web application project, and then you deploy the project on another computer. When you try to open the deployed project, you may receive the following error message:
The project you are trying to open is a Web project. You need to open it by specifying its URL path.

↑ Back to the top


Workaround

To work around this problem, use any of the following methods. For more information about each of these methods, click the method to view the procedure.

Manually copy the project files to the deployment computer

  1. On the deployment computer, create a folder named Project1 in the C:\Inetpub\Wwwroot folder.
  2. On the deployment computer, create a virtual directory named Project1, and then map this virtual directory to the C:\Inetpub\Wwwroot\Project1 folder.
  3. Copy all the project files from the devserver computer to the C:\Inetpub\Wwwroot\Project1 folder that you created on the deployment computer.

    Note devserver is a placeholder for the name of the development (or source) server.
back to the top

Deploy the project by using the same virtual directory name

When you deploy the project by using Microsoft Windows Installer, change the name of the virtual directory of the project to be the same as the name of the virtual directory of the original project (Project1). By default, the virtual directory name that the Setup wizard provides is the name of the Web Setup project (WebSetupProject1).

For more information, see step 5 of the "Run your Web Setup project on a remote (deployment) computer" section of this article.

back to the top

Rename the Webinfo file and the project files

After you deploy the project by using a Web Setup project, rename the Webinfo file and the project files to map to the virtual directory of the project. To do this, follow these steps:
  1. In Microsoft Windows Explorer, locate to the C:\Inetpub\wwwroot\WebSetupProject1 folder.
  2. Rename the following file, depending on your project:
    • If you are using Microsoft Visual C# .NET or Microsoft Visual C# 2005, rename the Project1.csproj.webinfo file to WebSetupProject1.csproj.webinfo.
    • If you are using Microsoft Visual Basic .NET or Microsoft Visual Basic 2005, rename the Project1.vbproj.webinfo file to WebSetupProject1.vbproj.webinfo.
  3. Rename the following file, depending on your project:
    • If you are using Visual C# .NET or Visual C# 2005, rename the Project1.csproj file to WebSetupProject1.csproj.
    • If you are using Visual Basic .NET or Visual Basic 2005, rename the Project1.vbproj file to WebSetupProject1.vbproj.
back to the top

↑ Back to the top


Status

This behavior is by design.

↑ Back to the top


More information

Methods to deploy a Web application project on a remote (deployment) computer

To deploy a Web application project on a deployment computer, use any of the following methods:
  • Manually copy the project to the deployment computer.
  • Create the project on the deployment computer.

    For more information, click the following article number to view the article in the Microsoft Knowledge Base:
    822316 How to create a new ASP.NET Web application on a remote Web server
  • Copy the project by using the Project Copy option in Microsoft Visual Studio .NET or in Microsoft Visual Studio 2005.

    For more information, click the following article number to view the article in the Microsoft Knowledge Base:
    326495 How to move your Visual Studio .NET Web project to another computer
  • Deploy the project by using the Web Setup option in Visual Studio .NET or in Microsoft Visual Studio 2005.

    If you use this method, you may receive the error message that appears in the "Symptoms" section of this article.

Steps to reproduce the behavior

To reproduce this problem, follow these steps:
  1. Create an ASP.NET Web application.
  2. Add a Web Setup project to your solution.
  3. Add the Web application files to your Web Setup project.
  4. Configure the Bootstrapper URL for your Web Setup project.
  5. Copy files to the bootstrapping application folder.
  6. Run your Web Setup project on a remote (deployment) computer.

Step 1: Create an ASP.NET Web application

  1. Start Visual Studio .NET or Visual Studio 2005.
  2. Use Visual C# .NET or Visual C# 2005 or use Visual Basic .NET or Visual Basic 2005 to create an ASP.NET Web Application project. Name the project Project1.

    Note In Visual Studio 2005, create an ASP.NET Web Site project.
  3. On the Build menu, click Build Solution.
back to the steps

Step 2: Add a Web Setup project to your solution

  1. In Solution Explorer, right-click the Project1 solution, point to Add, and then click Add New Project. The New Project dialog box appears.
  2. Under Project Types, click Setup and Deployment Projects.
  3. Under Templates, click Web Setup Project.
  4. In the Name text box, type WebSetupProject1.
  5. In the Location text box, type C:\DeployFolder, and then click OK.
back to the steps

Step 3: Add the Web application files to Your Web Setup project

  1. In the File System (WebSetupProject1) window, right-click Web Application Folder, point to Add, and then click File. The Add Files dialog box appears.
  2. Locate the C:\Inetpub\wwwroot\Project1 folder.
  3. Select all the files that are in the Project1 folder, and then click Open.
  4. In the File System (WebSetupProject1) window, expand Web Application Folder.
  5. Under Web Application Folder, right-click bin, point to Add, and then click File. The Add Files dialog box appears.
  6. Locate the C:\Inetpub\wwwroot\Project1\bin folder.
  7. Click the Project1.dll file, and then click Open.
back to the steps

Step 4: Configure the Bootstrapper URL for your Web Setup project

  1. In Solution Explorer, right-click WebSetupProject1, and then click Properties. The WebSetupProject1 Property Pages dialog box appears.
  2. In the Bootstrapper list box, click Web Bootstrapper. The Web Bootstrapper Settings dialog box appears.
  3. In the Setup folder URL text box, type http://devserver/Bootstrap1, and then click OK.

    Note devserver is a placeholder for the name of your Web server.
  4. In the WebSetupProject1 Property Pages dialog box, click OK.
  5. In Solution Explorer, right-click WebSetupProject1, and then click Build.
back to the steps

Step 5: Copy files to the bootstrapping application folder

  1. In the C:\Inetpub\Wwwroot folder, create a folder that is named Bootstrap1.
  2. Create a virtual directory that is named Bootstrap1, and then map this virtual directory to the C:\Inetpub\wwwroot\Bootstrap1 folder.
  3. Copy the following files from the C:\DeployFolder\WebSetupProject1\debug folder to the C:\Inetpub\wwwroot\Bootstrap1 folder:
    • Setup.Exe
    • WebSetupProject1.msi
back to the steps

Step 6: Run your Web Setup project on a remote (deployment) computer

  1. Start Microsoft Internet Explorer.
  2. Type the following URL in the address bar, and then press ENTER:
    http://devserver/Bootstrap1/Setup.Exe
    Note devserver is a placeholder for the name of your Web server.
  3. In the File Download dialog box, click Open.
  4. In the Security Warning dialog box, click Yes.
  5. In the WebSetupProject1 dialog box, click Next.
  6. Keep WebSetupProject1 in the Virtual directory text box. Click Next.
  7. On the Confirm Installation page of the WebSetupProject1 dialog box, click Next.
  8. On the Installation Complete page of the WebSetupProject1 dialog box, click Close.
  9. Locate the C:\Inetpub\wwwroot\WebSetupProject1 folder.
  10. Open the following file in a text editor such as Notepad:
    • If you are using Visual C# .NET or Visual C# 2005, open the Project1.csproj.webinfo file.
    • If you are using Visual Basic .NET or Visual Basic 2005, open the Project1.vbproj.webinfo file.
  11. Modify the URLPath element as follows:

    Visual C# .NET or Visual C# 2005 code
    <VisualStudioUNCWeb>
        <Web URLPath = "http://localhost/WebSetupProject1/WebSetupProject1.csproj" />
    </VisualStudioUNCWeb>
    Visual Basic .NET or Visual Basic 2005 code
    <VisualStudioUNCWeb>
        <Web URLPath = "http://localhost/WebSetupProject1/WebSetupProject1.vbproj" />
    </VisualStudioUNCWeb>
  12. Save the file as one of the following, depending on your project:
    • If you are using Visual C# .NET or Visual C# 2005, save the file as WebSetupProject1.csproj.webinfo.
    • If you are using Visual Basic .NET or Visual Basic 2005, save the file as WebSetupProject1.vbproj.webinfo.
  13. Open the following file, depending on your project:
    • If you are using Visual C# .NET or Visual C# 2005, open the Project1.csproj file.
    • If you are using Visual Basic .NET or Visual Basic 2005, open the Project1.vbproj file.
    You may receive the error message that appears in the "Symptoms" section of this article.
back to the steps
back to the "Workaround" section

↑ Back to the top


References

For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
326495 How to move your Visual Studio .NET Web project to another computer
822316 How to create a new ASP.NET Web application on a remote Web server
827028 PRB: Error message when you try to run a Web Setup project that was created by using Visual Studio .NET
For more information, visit the following Microsoft Developer Network (MSDN) Web sites:

↑ Back to the top


Keywords: kbvs2005swept, kbvs2005applies, kbpdwizard, kbideproject, kbsetup, kbdeployment, kbappsetup, kberrmsg, kbprb, KB830611

↑ Back to the top

Article Info
Article ID : 830611
Revision : 6
Created on : 3/27/2007
Published on : 3/27/2007
Exists online : False
Views : 577