Microsoft KB Archive/326495

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

Article ID: 326495

Article Last Modified on 10/17/2005

-

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

-



This article was previously published under Q326495



IN THIS TASK

 * SUMMARY
 * Requirements
 * Create an ASP.NET Web application on the source computer by using Visual C# .NET
 * Create project folders on the target computer
 * Copy the project to the target computer
 * Open the project on the target computer
 * REFERENCES



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.

back to the top

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.

back to the top

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.

back to the top

Create project folders on the target computer
 Create the project folder.

To do this, follow these steps:  Create the WebApplication1 folder at C:\Inetpub\wwwroot\ of the target computer. 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

  Create the virtual directory.

To do this, follow these steps:  Click Start, point to Settings, and then click Control Panel. 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.</li> Expand the server name.</li> In the left pane, right-click Default Web Site, point to New, and then click Virtual Directory.</li> On the Virtual Directory Creation Wizard screen, click Next to continue.</li> On the Virtual Directory Alias screen, type an alias or name for the virtual directory (such as WebSpplication1 ), and then click Next.</li> On the Web Site Content Directory screen, click Browse. Locate the content folder that you created to hold the content (c:\Inetpub\wwwroot\WebApplication1).</li> Click Next to continue.</li> On the Access Permissions screen, click to select the check boxes for Read, Run scripts (such as ASP), and Browse.</li> Click Finish.</li></ol> </li> 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\ \My Documents\Visual Studio Projects\.

Note  is the user name to log on to the computer.</li></ol>

back to the top

Copy the project to the target computer
To copy the project to a remote computer, follow these steps on the source computer:  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 \\ \wwwroot$ where  is the name of remote server computer.</li> Copy the Project.

To do this, follow these steps:  On the Visual Studio .NET menu of WebApplication1, click Project, and then click Copy Project.</li> In the Destination project folder text box, type http:// /WebApplication1, where  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 &quot;Create Project Folders on the Target Computer&quot; section of this article.</li> <li>In Web access method, click the File Share option. In the Path text box, type :\WebApplication1.

Note  represents the name of the mapped network drive.</li> <li>In Copy, click to select the All the files in source project folder option.</li> <li>Click OK to copy the project.</li></ol>

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.

</li></ol>

back to the top

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\ \My Documents\Visual Studio Projects\WebApplication1, and then click Save.

back to the top

<div class="references_section">