Click here to Skip to main content
12,897,360 members (55,063 online)
Click here to Skip to main content
Add your own
alternative version


48 bookmarked
Posted 13 Mar 2005

How to copy and configure ASP.NET projects between different local computers

, 13 Mar 2005
Rate this:
Please Sign up or sign in to vote.
This article describes how to copy project files from one disk source containing an invalid URL path, and set it up to allow VS.NET to accept the project by configuring a proper mapping.


I wrote this article because I had many questions asked of me regarding the "simple" act of copying Visual Studio .NET projects from removable disk drives to a local machine. The issue is how the webinfo file was first created in the original project and what Visual Studio .NET looks for to map your project to the URL. The software is not "smart" enough to know that you saved your project on a floppy disk just so you could work on the project somewhere else on a different machine. So, when you try opening a project from a floppy drive, you get a type of error message that tells you the file path (from the A: drive) does not correspond to the URL that you set up with the original application, like with your localhost URL.

My example shows you how to copy VS.NET to accept your project by doing three general things, which are a) Change the vbproj.webinfo file to correspond to the path you want to work on in the destination computer, b) copy the project file to that destination path you specified and c) change the folder to an application in IIS.

Symptomatic type of error message:

Reason: The file path of the destination project does not map correctly to the project path specified in the webinfo file when trying to open it in Visual Studio .NET. For smaller projects with several files, it may be more convenient to just create a new project in VS.NET and add files to it from another project on a different disk location by using the Project menu in VS.NET. However, in larger projects that contain many files this option may be impractical. To get around adding all these files manually, follow these steps.

Steps to copy your project from one disk location to another computer with a different disk location or file path name and configure it appropriately to run.

  1. Go to the project you want to copy, such as one saved on an A: floppy drive.
  2. Find the vbproj.webinfo folder (or csproj.webinfo for C#) and double-click this file. It should look something like this:


<Web URLPath = "http://localhost/ControlsList/WebForms/ControlsList.vbproj" />


  1. This file is what is mapped between VS.NET and IIS from the original project. Note: localhost can also appear as the actual name of your local computer, whatever name you may have given it.
  2. Next, change the path name to the folder you want to copy your project to. For example, lets say we want to copy this project to just the ControlsList folder in the server root folder, so we would modify this as:


<Web URLPath = "http://localhost/ControlsList/ControlsList.vbproj" />


  1. Save this file and close it.
  2. Using Windows Explorer, copy your project folder from the source disk, (which will contain all the projects files from the A: drive in our example above) to the C:\Inetpub\wwwroot directory. Remember we changed the webinfo file to just have this folder in the server root. Now, it will have a physical file path of C:\Inetpub\wwwroot\ControlsList
  3. Go to the Internet Information Services console. In Windows XP, choose ‘Control Panel-> Performance and Maintenance-> Administrative Tools and double-click Information Internet Services.
  4. Expand the (local computer) plus sign and expand the Default Web Site section (show in the diagram):

  5. Go to the folder you copied from the A: drive to the wwwroot folder. For our example, the folder is named ‘ControlsList’. Notice how it is shown as a folder as like so: <?xml:namespace prefix = v /><v:shapetype id=_x0000_t75 stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"><v:f eqn="sum @0 1 0"><v:f eqn="sum 0 0 @1"><v:f eqn="prod @2 1 2"><v:f eqn="prod @3 21600 pixelWidth"><v:f eqn="prod @3 21600 pixelHeight"><v:f eqn="sum @0 0 1"><v:f eqn="prod @6 1 2"><v:f eqn="prod @7 21600 pixelWidth"><v:f eqn="sum @8 21600 0"><v:f eqn="prod @7 21600 pixelHeight"><v:f eqn="sum @10 21600 0"><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"><?xml:namespace prefix = o /><o:lock aspectratio="t" v:ext="edit">
  6. Right click on the folder and select ‘Properties” as shown here.

  7. Under the application settings, click the “Create” button for the “Application name:” property.

    Notice that you will see the folder name appear in the text box and the button text changes from "Create" to “Remove" (shown here):

  8. Click on Apply and click OK.
  9. Notice in the Internet Information Services panel how the folder icon changes from a folder icon to an application icon as shown here:
  10. Lastly go to Visual Studio .NET and BUILD your project.
  11. Run your project with the IDE or browser.

    If you see a “Parse error message: Could not load type <packagefolder>.<WebformClass>” (shown below) when you run your project, then the issue may be because:

    1. You did not successfully convert the project folder into an application. To correct this, follow the above steps 7 through 15 again.
    2. You did not build your project. To do so in VS.NET, from the Build menu, either build or rebuild you project.
Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'ControlsList.WebForm1'.

Source Error:

Line 1: <%@ Page Language="vb" AutoEventWireup="false" Codebehind="ControlsList.aspx.vb" Inherits="ControlsList.WebForm1"%>

Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

Line 3: <HTML>

Source File: c:\inetpub\wwwroot\ControlsList\ControlsList.aspx Line: 1

Version Information: Microsoft .NET Framework Version:1.1.4322.2032; ASP.NET Version:1.1.4322.2032


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Software Developer (Senior) PNC Bank
United States United States
Harry is a .NET Developer for a major financial institution building web and stand alone applications and class libraries. He also has experience teaching courses on ASP.NET and Microsoft databases. He holds a Master's degree in Information Science.

You may also be interested in...


Comments and Discussions

GeneralCan't display the application in web browser Pin
Lian_H19-Jun-08 5:25
memberLian_H19-Jun-08 5:25 
GeneralRe: Can't display the application in web browser Pin
harryteck19-Jun-08 15:34
memberharryteck19-Jun-08 15:34 
GeneralCommand line for COPY PROJECT in VS.NET 2003 Pin
lochan_indiana6-Sep-07 8:53
memberlochan_indiana6-Sep-07 8:53 
QuestionCannot run the project after copy to new system? Pin
mrajanikrishna25-May-06 16:11
membermrajanikrishna25-May-06 16:11 
AnswerRe: Cannot run the project after copy to new system? Pin
harryteck26-May-06 3:23
memberharryteck26-May-06 3:23 
GeneralRe: Cannot run the project after copy to new system? Pin
mrajanikrishna26-May-06 14:55
membermrajanikrishna26-May-06 14:55 
GeneralRe: Cannot run the project after copy to new system? Pin
harryteck27-May-06 17:13
memberharryteck27-May-06 17:13 
QuestionRe: Cannot run the project after copy to new system? Pin
mrajanikrishna28-May-06 15:06
membermrajanikrishna28-May-06 15:06 
QuestionHow to open the web app on the internet Pin
HF Solutions3-Mar-06 12:46
memberHF Solutions3-Mar-06 12:46 
AnswerRe: How to open the web app on the internet Pin
harryteck5-Mar-06 14:22
memberharryteck5-Mar-06 14:22 
QuestionWorking in a Different Pool Pin
Centinell26-Feb-06 3:12
memberCentinell26-Feb-06 3:12 
AnswerRe: Working in a Different Pool Pin
harryteck26-Feb-06 8:54
memberharryteck26-Feb-06 8:54 
GeneralThanks for saving me time!! Pin
jumpstart791-Feb-06 22:21
memberjumpstart791-Feb-06 22:21 
GeneralRe: Thanks for saving me time!! Pin
harryteck2-Feb-06 17:23
memberharryteck2-Feb-06 17:23 
QuestionContinuation to an earlier Query :Error in writing to the Event Log Pin
Aanchal Naidu16-Dec-05 12:55
memberAanchal Naidu16-Dec-05 12:55 
GeneralThanks Harry and one more Query Pin
Aanchal Naidu16-Dec-05 12:18
memberAanchal Naidu16-Dec-05 12:18 
GeneralRe: Thanks Harry and one more Query Pin
harryteck17-Dec-05 4:40
memberharryteck17-Dec-05 4:40 
GeneralRe: Thanks Harry and one more Query Pin
harryteck17-Dec-05 4:47
memberharryteck17-Dec-05 4:47 
QuestionRe: Thanks Harry and one more Query Pin
Aanchal Naidu18-Dec-05 4:37
memberAanchal Naidu18-Dec-05 4:37 
QuestionQuestions regarding:How to copy and configure ASP.NET projects between different local computers Pin
Aanchal Naidu16-Dec-05 5:11
memberAanchal Naidu16-Dec-05 5:11 
AnswerRe: Questions regarding:How to copy and configure ASP.NET projects between different local computers Pin
harryteck16-Dec-05 6:24
memberharryteck16-Dec-05 6:24 
Generalcopy and configure ASP.NET projects between different local computers Pin
sidda23-Nov-05 12:22
membersidda23-Nov-05 12:22 
GeneralRe: copy and configure ASP.NET projects between different local computers Pin
harryteck23-Nov-05 14:16
memberharryteck23-Nov-05 14:16 
QuestionHow to use my web application on another computer Pin
Nisarat30-Jun-05 18:43
memberNisarat30-Jun-05 18:43 
AnswerRe: How to use my web application on another computer Pin
harryteck2-Jul-05 8:42
memberharryteck2-Jul-05 8:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170424.1 | Last Updated 13 Mar 2005
Article Copyright 2005 by harryteck
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid