xcopy of ASP.NET applications

  • Thread starter Thread starter Bruce Schechter
  • Start date Start date
B

Bruce Schechter

Whereas Microsoft highlights the concept of "xcopy deployment" for .NET
applications, I gather that it is not necessarily possible to move an
ASP.NET application from one computer to another via xcopy. After doing
some simple development via vs.net I found that xcopy'ing my app from a
development workstation to the production server didn't work, but I easily
dealt with that problem via vs.net's "copy project" menu command. I assume
that "copy project" is altering metadata within certain files to configure
the app for the target computer, and perhaps making some changes in IIS on
the target to set up the new application. So far, so good.

But today I decided to use some sample code from that I downloaded from the
web. I put the collection of files for the sample application into a new
directory withing the wwwroot directory (where IIS is running on my local
development client computer.) When I try to load the code in vs.net, I am
not able to do so. I've tried opening via both the .sln file and the
..csproj file, but neither works.

Is there a good article somewhere that describes the general topic of moving
application files around between multiple development workstations and
finally to the production server? This whole topic has been confusing to
me, and none of the .NET or ASP.NET books I own seem to cover it.

Thanks!
Bruce Schechter
 
Hi James,


Thank you for using Microsoft Newsgroup Service. Based on your description,
you want to get some detailed information on deploying an ASP.NET web
application, especially the "xcopy" deployment. Please feel free to correct
me if my understanding of your problem is not quite exact.

Generally, in dotnet, since all the components( dotnet assemblies ) are
self described, so when we want to redistribute a application, we can just
use xcopy to move the application and its denpendent assemblies(if needed
also include the application config file). As for the ASP.NET web
application, if you are using the code-behind page class, all the page
class will be build into the application's assembly. So when you've
finished developing your web app, you can just use xcopy to move all the
page files(aspx) and asax or ... and some other config file such as
web.config to the deployment place. In addition, since the ASP.NET is web
application, you need to create a Virutal Directoy in IIS for the
application, not just copy to a directory under the IIS's root directoy. To
make it clearly, you may try creating a simple ASP.NET application in
VS.NET. After add some code and build it. Then, copy the things I mentioned
above to another new virtual Directoy to see whether it works, that'll help
you get it more clear.

As for the "Copy Project" function in VS.NET you mentioned, yes, it can
help to copy one project to another new web based url position. The VS.NET
will help you create Virtual Directory, project files and copy source files
to the destinate position. However, I think this is mostly used when you're
still develping a ASP.NET web project, and you want to genreate a copy of
the project. For deployment time, the project files are not necessary to
copy, also the page class's file are not necessary if you are using the
code-behind mode and build them into assemblies as I mentioned above. For
more information on deployment for ASP.NET application or the Copy project,
you may reference the tech articles in MSDN, here is some of their weblinks:

#Deployment Scenarios
http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondeploymentscenario
s.asp?frame=true

#Walkthrough: Deploying an ASP.NET Web Application
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconwalkthroughdeployi
ngaspnetwebapplication.asp?frame=true

#Determining When to Use Windows Installer Versus XCOPY
http://msdn.microsoft.com/library/en-us/dndotnet/html/xcopywininst.asp?frame
=true


#Copy Project Method
http://msdn.microsoft.com/library/en-us/vbcon/html/vxlrfvslangprojvsprojectc
opyproject.asp?frame=true

Please check out the above suggestions to see whether they are helpful.


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
Hi Steven,

This is very helpful, and thanks for the articles.

Done!

Cheers,
Bruce
 
Back
Top