Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS - Changing binding from one site to another without downtime

I am attempting to use ServerManager from a C# console application to make some site changes to the IIS metabase.

I have a site I want to deploy without any downtime, to do this I am:

  1. Creating a new second site with it's own application pool using the new DLLs

  2. Adding a binding which can be accessed locally so I can fire the first request into the second site and it's "warmed up"

  3. I am removing the binding of www.domain.com from the original site, and then adding it to the second site, then calling CommitChanges()

Here is where the trouble starts, the binding information is correctly updated, however IIS has stopped the second site. Is there some way I can remove the original binding and place it on a new site without calling commit changes twice?

I really want to avoid having the overhead of ARR in this instance or any other load balancing etc, is there a way of swapping a binding from one site to another without downtime? It really feels like there should be.

like image 599
CameraSchoolDropout Avatar asked Jul 17 '12 12:07

CameraSchoolDropout


1 Answers

If Microsoft doesn't support this with IIS, you'll be happy to know that you can do this with nginx: http://developer.7digital.com/blog/atomic-mono-deployment-capistrano-and-nginx-under-debian

like image 95
knocte Avatar answered Sep 22 '22 00:09

knocte