How to move your Visual Studio .NET Web project to another computer

Article translations Article translations
Article ID: 326495 - View products that this article applies to.
This article was previously published under Q326495
Expand all | Collapse all

On This Page

SUMMARY

This step-by-step article describes how to create a Visual Studio .NET Web Project on one computer, and then move the project to second computer and open the project on the second computer.

Requirements

  • Microsoft Windows 2000 or Windows XP Professional
  • Microsoft .NET Framework
  • Microsoft Internet Information Services (IIS)
  • Microsoft Visual Studio .NET
Note This environment is required on both the source computer and the target computer.

Create an ASP.NET Web application on the source computer by using Visual C# .NET

To create a new ASP.NET Web Application project named WebAplication1 by using Microsoft Visual C# .NET, follow these steps:
  1. Open Visual Studio .NET.
  2. On the File menu, point to New, and then click Project.
  3. In the New Project dialog box, under Project Types, click Visual C# Projects. Under Templates, click ASP.NET Web Application.
  4. In the Location text box, type WebAplication1. If you are using the local server, you can leave the server name as http://localhost so that the Location text box is set to http://localhost/WebAplication1.
  5. From the ToolBox, drag a TextBox control to WebForm1.aspx.

Create project folders on the target computer

  1. Create the project folder.
    To do this, follow these steps:
    1. Create the WebApplication1 folder at C:\Inetpub\wwwroot\ of the target computer.
    2. Share the C:\Inetpub\wwwroot\ folder. Give Full Control permissions to the Authenticated users.

      For more information about how to share the files and folders, click the following article number to view the article in the Microsoft Knowledge Base:
      301281 How to share files and folders over a network for workgroups in Windows 2000
  2. Create the virtual directory.
    To do this, follow these steps:
    1. Click Start, point to Settings, and then click Control Panel.
    2. Double-click Administrative Tools, and then double-click Internet Services Manager. Or, if you run Microsoft Windows XP on your computer, open Internet Information Services.
    3. Expand the server name.
    4. In the left pane, right-click Default Web Site, point to New, and then click Virtual Directory.
    5. On the Virtual Directory Creation Wizard screen, click Next to continue.
    6. On the Virtual Directory Alias screen , type an alias or name for the virtual directory (such as WebSpplication1), and then click Next.
    7. On the Web Site Content Directory screen, click Browse. Locate the content folder that you created to hold the content (c:\Inetpub\wwwroot\WebApplication1).
    8. Click Next to continue.
    9. On the Access Permissions screen, click to select the check boxes for Read, Run scripts (such as ASP), and Browse.
    10. Click Finish.
  3. Create the solution folder.
    To do this, create the solution folder WebApplication1 for .sln file in Visual Studio Projects. This is located at C:\Documents and Settings\UserName\My Documents\Visual Studio Projects\.

    Note UserName is the user name to log on to the computer.

Copy the project to the target computer

To copy the project to a remote computer, follow these steps on the source computer:
  1. Connect to a Shared Folder by Using a Mapped Drive.
    Connect the folder C:\Inetpub\wwwroot on the remote computer, with Map Network Drive as \\server\wwwroot$ where server is the name of remote server computer.
  2. Copy the Project.
    To do this, follow these steps:
    1. On the Visual Studio .NET menu of WebApplication1, click Project, and then click Copy Project.
    2. In the Destination project folder text box, type http://servername/WebApplication1, where servername is the name of your server. WebApplication1 is the virtual directory and is also the name of the folder that you created in step 2 of the "Create Project Folders on the Target Computer" section of this article.
    3. In Web access method, click the File Share option. In the Path text box, type F:\WebApplication1.

      Note F represents the name of the mapped network drive.
    4. In Copy, click to select the All the files in source project folder option.
    5. Click OK to copy the project.
    Note While copying the project, you may receive the following error messages because of incompatibility between the versions of Internet Information Server (IIS) on the source and the target computers.
    Microsoft Development Environment
    The Web was created successfully, but an error occurred when trying to configure the application root for this Web. Web projects may not operate correctly without an application root. The returned error was: Active Directory Services cannot find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. The usual cause for this error is creating Web projects on a Windows 2000 or newer server from a Windows NT 4.0 client. You can manually configure the application root using the Internet Services Manager.
    -or-
    Microsoft Development Environment
    Microsoft Development Environment Unable to set the permissions on the 'bin' folder to restrict browse access. Active Directory Services cannot find the web server. A possible cause for this is an incompatibility between versions of Internet Information Server (IIS) on the client and the server. The usual cause for this error is creating Web projects on a Windows 2000 or newer server from a Windows NT 4.0 client. You can manually restrict browse access to this folder using the Internet Services Manager.

Open the project on the target computer

To open the project on the target computer after you successfully copy the project from the source computer, follow these steps:
  1. In Visual Studio .NET, on the File menu, point to Open, and then click Project From Web.
  2. Type the address of your virtual server and the project file name (for example, type http://localhost/WebApplication1), and then click Open.
  3. Move to the C:\Inetpub\wwwroot\WebApplication1 folder, select the .csproj file, and then click Open.
  4. On the Build menu, click Build Solution.
  5. To save the solution (.sln) file, select the folder C:\Documents and Settings\UserName\My Documents\Visual Studio Projects\WebApplication1, and then click Save.

REFERENCES

For more information, click the following article number to view the article in the Microsoft Knowledge Base:
308582 How to connect and disconnect a network drive in Windows XP
320451 Remote ASP.NET projects require IIS on the client computer or FrontPage Server Extensions on the server computer


Properties

Article ID: 326495 - Last Review: October 17, 2005 - Revision: 4.4
APPLIES TO
  • Microsoft ASP.NET 1.0
  • Microsoft Visual Studio .NET 2002 Enterprise Architect
  • Microsoft Visual Studio .NET 2002 Enterprise Developer
  • Microsoft Visual Studio .NET 2002 Professional Edition
  • Microsoft ASP.NET 1.1
  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
  • Microsoft Visual Studio .NET 2003 Professional Edition
Keywords: 
kbwebserver kbhowtomaster KB326495

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com