I'm aiming for a zero-downtime deployment of our ASP.NET 4.0 web application and the Internets say that the kosher way of doing this is as follows:

  • Copy new files over to c:\inetpub\my-site-new-version
  • Change application physical directory from c:\inetpub\my-site-old-version to c:\inetpub\my-site-new-version

Now, it all sounds fine and dandy, but nowhere I could find any information on what happens to requests in-flight while IIS changes its settings. In other words, what are the consequences of changing physical directory of an application that is currently serving requests?


We've had this situation in the past. We opted to duplicate the website in IIS and then switched the host headers, but ran into problems because it a couple of seconds to switch them out.

Changing the file location would be an option, but I'm willing to bet that IIS would restart the app in this case. It wouldn't make sense for the web application/site to not be recycled after something like a file location change.

Possibly a script to switch out the host headers might work better between two apps?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.