HyperLink HyperLink
Search Blog

HyperLink

AddThis Feed Button
Bookmark and Share




 
 

Web Setup Projects - My dream setup package for web applications

If you ask any developer as to what is their preferred way of deploying web sites, 99% of them will say FTP. No doubt FTP is a standard way today to deploy ASP.NET applications. However, FTP deployment has drawbacks of its own. Some of them include:

  • You need administrator's help to create virtual directory
  • You need need administrator's help to put components in GAC
  • You need to run database script separately from SQL Server Management Studio
  • You need to know which files are to deployed e.g. csproj, sln, .pdb are to be excluded where as .aspx, .cs, .dll are to be included.
  • If files to be deployed are too many then people often deploy folder by folder. That means you need to be in front of machine till the time you deploy all the files

All the above points may sound simple but if imagine that you are installing the application on say 50 different machines. Agree once you know these steps thoroughly you can simply execute them one by one to deploy your application. However, won't it be nice if you have a setup program that does all these tasks for you?

In the current version of Visual Studio you can create MSI based web setup projects and then execute them on the server. However, the most problematic fact here is that you rarely have physical access to the server. Moreover if you go to any serious server administrator and ask him to execute an EXE on his live server he will look at you as if you have long criminal history :-) So, the current MSI based setup projects are not very commonly used for deploying web applications.

I would love if Microsoft allows us to create web setup projects as explained below. I call them "remote setup". This may not eliminate all the problems that I listed above but at least you can install your app from any machine. You may feel that I am expecting too much but this is my "dream setup" requirements :-)

  • I will create a web setup project by specifying folder structure and files to deploy. This step will be very much similar to what we do today
  • I will also package .sql file containing database script
  • I will compile the web setup project into an EXE
  • Now I will give that EXE to anyone who wish to install the web application. He need not know anything about which files to copy and which script to run
  • In order to install the application the user will run that file on either his machine or on the server. That's right! This is what is "remote setup".
  • The first step that the installation wizard should show is the target location in terms of local or remote
  • If you say remote then the wizard should accept FTP user ID and password
  • If you choose local installation then next installation step will ask you for target IIS virtual directory. You can also create a new virtual directory here. You can also set ASP.NET version information.
  • The wizard will then copy all the files to the destination directory
  • It will then ask you if you wish to execute some database script
  • If you say yes then database credentials and script file name (which you must package along with the setup) is accepted
  • The database script is then executed
  • You are asked if you wish to retain the database script file or delete it and depending on your selection the action is taken
  • The setup then completes the rest of its operations
  • The setup should not add any information about uninstalling it. Web applications are rarely uninstalled using any setup tools.

I would still go further and suggest that don't create MSI based EXE at all. Something like VSI or some non executable format which is understood by .NET alone and which cannot cause any damage to the machine would be great.

Some of you will argue that something like database scripts can be executed even today by creating a custom assembly handling certain events. However, it is a painful thing that for such a common operation you write lot of code again and again.

Well...that's my dream web setup project and I hope that one day we can have it in Visual Studio.




Posted On : 13 Apr 2007
Current Rating :
Rate This Article :

About the Author
Bipin Joshi
Bipin Joshi is a .NET trainer and consultant and runs his own firm, BinaryIntellect Consulting. He is a Microsoft MVP and a member of ASPInsiders. He is a prolific writer on .NET technologies and runs a network of popular web sites including dotnetbips.com and binaryintellect.net. Having adopted Yoga way of life he remains absorbed in deep meditation when away from computers. His detailed profile can be read at his blog bipinjoshi.com.


Post your comments

Your Name :

Your Web Site (Optional) :

Subject :

Comments :


Copyright (C) Bipin Joshi. All rights reserved.
Contact Us
Read Terms Of Use
Windows Server Hosting by ORCS Web