views:

333

answers:

6

I am looking for some ideas on how to offer a installation package for my ASP.NET website. Some things I need to be able to do is read/write Registry keys, get the database(s) information and test the connection and I must be able to overwrite the existing website without an uninstall and update the web config on new versions. I do not wish to uninstall the website and re-install it. I would like minimum downtime on upgrades. I think I am going to have to implement a custom solution and if this is true how can i include all the output of my web application into my custom solution?

EDIT: I am not installing this on my own system(s). This is for distribution to other clients who will be installing/upgrading the website. It is important that I be able to upgrade to the latest asp.net website without uninstalling. Ideally it would be overwriting the existing site and updating the web.config file.

A: 

I think you can build asp.net application into .msi package and install it. Is that what you are looking for? And then you can build all of your customization into pre-deployment and post-deployment scripts.

J.W.
A: 

I use NAnt and NSIS with some small console apps where they can't easily do some manipulations I require.

ck
+5  A: 

Option 1. Create web application installation package

Use Web Setup Project for creating a web application installation package (.msi)

Creating or Adding a Setup Project at MSDN

You can create your installation the way it will offer user an Upgrate option of your application if it's already installed on his or her machine. That's not a problem.

Alternatives to Web Setup Project (all of them can handle upgrade scenarios):

Optoin 2. Deploy web application on the server

You can use NAnt or MSBuild or IIS Web Deployment Tool for these tasks automation.

For example with NAnt of MSBuild you could specify tasks like these:

  • get project files from source repository
  • update .config file and maybe some other files if needed
  • compile you web application
  • update registry settings on the server
  • update database schema on the server
  • synchronize files (x-copy) between you build folder to IIS web folder

Web Deployment Blog

Option 3. Distribute your web applications via Web Plafrom Installer.

http://www.microsoft.com/web/

Koistya Navin
I appreciate your updates. I am not trying to do a deployment to my own machines though, I currently have a really nice setup for that locally that works great. I need to do something for distributing the website to other users as a software package that they can install.
Greg
Got it, then you should use Web Setup Project and compile your web application into .msi
Koistya Navin
I don't think this will allow me to do updates without an uninstall though right? And then they would have to go through the information gathering process again and a new install?
Greg
I am sure you can. It also cans upgrate your previously installed web app as well.
Koistya Navin
The only problem with Web Setup Project it's hard to customize it without learning from inside out. Perhaps it will be easier for you to use an alternative like Wise, InstallShield or Nullsoft
Koistya Navin
+1  A: 

Have you looked into Web Deployment Projects or the IIS Web Deployment Tool?

John Saunders
It looks like this solution only handles IIS 7? Also, I am unable to find any information on how it handles updates.
Greg
"Web Deployment Projects" is not good for deploying website especially when you need to make registry changes etc. on the server.
Koistya Navin
The Web Deployment Tool does IIS 6 and 7. What do you mean about updates? A package can contain whatever you want it to.
John Saunders
@Koistya: If you read http://weblogs.asp.net/scottgu/archive/2005/11/06/429723.aspx, you'll see that you can use a Web Setup project along with a Web deployment project. Sorry, I thought they had merged the two.
John Saunders
I keep saying updates but what I really mean is upgrades. I need to upgrade the website without an uninstall and keeping the web.config and registry settings.
Greg
A: 
Eduardo Molteni
A: 

Let me start by saying we offer a complete updating solution which includes:

wyUpdate handles all of the Vista/Windows 7 UAC problems and all the file permission problems that inevitably pop up when you're trying to update complex software. Many of our customers have successfully used wyBuild & wyUpdate to deliver updates for their ASp.NET applications.

That being said, if you want to build your own updater here are some tips:

Building your own updater

A good place to start is the wyUpdate C# source code I mentioned above. You can cannibalize it and use it for your own purposes. Some of the algorithms it contains:

  • Full Windows Vista / Windows 7 UAC support
  • Ability for limited users to check and then update if they have credentials
  • Support for wonky corporate inernet. (If you've ever worked with a corporation this is a real problem).
  • Quick extracting, patching, and installing of files.
  • Registry support.
  • Roll back files & registry on error or cancellation by the user
  • Self-update (no files left behind)

We also have the file specifications here.

Wyatt O'Day