How do you do production IIS website depoys?

Solution 1:

IIS supports xcopy deployment so just copying the files should be all you need unless you have special requirements.

One way to do it is a simple script that uses ROBOCOPY to copy the new files to the server.

If the site is large and this takes too long, use a version control system. I like Mercurial for this purpose, although you have to be careful that the version control system's configuration files don't end up being served to the public. Deploying is then simply a matter of committing the changes and then checking out the latest version on the server. In addition to being efficient, this allows quick rollbacks (if you tagged the last good version) in case your latest-and-greatest has a showstopper bug.

To minimize downtime, you could have the script copy the files to a new directory and then quickly rename the directories, or change where IIS points to the new directory.

Solution 2:

Consider using the Web Deployment Tool from Microsoft. It was specifically designed to help deploy web applications and updates to those web applications to production IIS 6 and 7 web servers and it does a better job of the task than MSI (Windows Installer), IMHO.

Normally you use it by setting up a "gold master" site somewhere and then telling the tool to pack up the changes from there. It will then look at a target server for deployment and make any changes necessary to make it look like the gold master (which is useful for subsequent updates). It is particularly useful if you are deploying to more than one web server (i.e. a farm), and it has support for deploying more than just files (it can also handle making registry changes, deploying certs, SQL databases, etc).