Application Deployment in ASP.NET 2.0

FTP? MSI? Copy Web Site? Wherever you deploy, there you are


May 09, 2005
URL:http://www.drdobbs.com/application-deployment-in-aspnet-20/184406059


Application Deployment in ASP.NET 2.0

FTP? MSI? Copy Web Site? Wherever you deploy, there you are

The deployment of a web application is a task that can be accomplished in various ways depending on the context. As far as copy is concerned, you can use any of the following: FTP transfer, any server management tools providing forms of smart replication on a remote site, or an MSI installer application. In Visual Studio .NET 2005, you can even use the newest and loudly requested “Copy Web Site” function.

Each option has pros and cons, and the best fit can only be found once you know exactly the runtime host scenario and the purpose of the application is clearly delineated. Be aware that if you’re going to deploy the application on an ISP host, you might be forced to play by the rules (read, use the tools) that your host has set. If you’re going to deliver a front-end for an existing system to a variety of servers, you might perhaps find a setup project easier to create. On the other hand, FTP is great for general maintenance and for applying quick fixes. Ad hoc tools, instead, could give you automatic sync-up features. Guess what? Choosing the right technique is strictly application specific and is ultimately left to you.

FTP gives you much freedom and lets you modify and replace individual files. It doesn’t represent a solution that is automatic in nature, however: Whatever you need to do must be accomplished manually. Assuming that you have gained full access to the remote site, using FTP is not much different than using Windows Explorer in the local network.

Another common scenario involves using an out-of-the-box installer file. Deploying a web application this way is a two-step operation. First, you create and configure the virtual directory; next, you copy the needed files. Visual Studio .NET makes creating a Web setup application a snap. You just create a new type of project—Web Setup Project—select the files to copy, and build the project. What you get out of it is a brand new MSI installer file.

The new “Copy Web Site” function also provides synchronization capabilities. It is not like the set of features that a specifically designed server management tool would supply, but it can certainly work well through a number of realistic situations. At the end of the day, a site replication tool doesn’t do much more than merely transferring files from end to end. Its pluses are the user interface and the intelligence built around and atop this basic capability. So a replication tool maintains a database of files with timestamps, attributes, and properties and can sync up versions of the site in a rather automated way, minimizing the work on your end.

The Copy Web Site function is a sort of integrated FTP tool that enables you to easily move files around. You connect to the target destination, select the desired copy mode—overwrite source to target files, target to source files, sync up source and target projects—and then proceed with the physical files copy. The Copy Web Site function is ideal for deployment especially in hosting-environment scenarios when you need to manage live server files. In addition, the tool can operate as a synchronization mechanism, which is helpful to quickly test applications in different scenarios and configurations.


Dino Esposito is Wintellect's ADO.NET and XML expert, and a trainer and consultant based in Rome, Italy. Dino is a contributing editor to Windows Developer Network and MSDN Magazine, and the author of several books for Microsoft Press including Building Web Solutions with ASP.NET and ADO.NET and Applied XML Programming for .NET. Contact Dino at [email protected].


Terms of Service | Privacy Statement | Copyright © 2024 UBM Tech, All rights reserved.