2

Possible Duplicate:
How Do I deploy an application to IIS while that web application is running

How to deploy an ASP.NET Application with zero downtime

Publishing/uploading new DLL to IIS: website goes down whilst uploading

Is smooth deployment possible with componentized ASP.NET MVC apps?

I have a website that runs on a single server (so no load balancers). When I make a deployment using MSDeploy, all the files in my virtual directory get overwritten. This is expected, of course. The problem is that my users get interrupted for 15-30 seconds or so while IIS resets. Not a big deal, but it would be better if there were 0 interruption. I don't think this is avoidable, but wanted to check to see if anybody on SO knew something I didn't

Community
  • 1
  • 1
kenwarner
  • 28,650
  • 28
  • 130
  • 173
  • does this SO question help: http://stackoverflow.com/questions/148084/how-to-deploy-an-asp-net-application-with-zero-downtime – Baz1nga Aug 11 '11 at 16:07
  • I've written answers to questions about this quite a few times so I hope you don't think I'm taking advantage of my mod role to close this as a duplicate. – Kev Aug 17 '11 at 22:47

3 Answers3

1

btw the approach as I mentioned here: How to deploy an ASP.NET Application with zero downtime is the approach that even we follow at my company and it has worked out well for us till now. We have an app developed that aids us in the same..

Its integrated with Teamcity a continuous integration tool that tells us the progress of the deploy and logs the same.

Community
  • 1
  • 1
Baz1nga
  • 15,485
  • 3
  • 35
  • 61
  • which approach are you using? TxF? – kenwarner Aug 11 '11 at 16:20
  • I am not sure if we use TxF or not.. but its about not polluting your deploy share with corrupted deploys and you need to manage the same TxF or not.. we have different folders created per revision and then a cleanup process runs daily that cleans up old versions. – Baz1nga Aug 11 '11 at 16:26
0

If your code or web.config was changed, IIS will restart the application. There may be a way around that, but the amount of work involved would far outweigh the benefits.

James Johnson
  • 45,496
  • 8
  • 73
  • 110
-1

It is do-able, it just depends on how complicated you want your build/deploy to be.

For example you could:

  • Deploy your site to a new folder (i.e. sitename_deploy)
  • Create a virtual directory to the new folder
  • Force a load of the new site (so that IIS starts up the site)
  • Rename your existing site directory (i.e. sitename_old)
  • Rename the new site folder to the correct live folder name (i.e. sitename)
  • Remove your old site (i.e. sitename_old)
  • Remove the virtual directory you created in step 2.

It should be said that I haven't actually tried this so it might be rubbish and IIS may restart the site when the virtual directory path changes. ;-) If it does work, your only down time will be the time it takes to rename the two directories.

DoctorMick
  • 6,703
  • 28
  • 26
  • 1
    Pretty much what DoctorMick said, but in a powershell script using ARR: https://github.com/yosoyadri/IIS-ARR-Zero-Downtime/blob/master/DeployLocalFarm.ps1 – Yosoyadri Mar 04 '13 at 11:12
  • I'm pretty sure this restarts the app. The web.config changes/moves. – usr Jan 07 '15 at 14:42
  • 1
    This will cause some downtime when you rename/switch folders. The yosoyadri/IIS-ARR-Zero-Downtime method with blue green deployment is the way to go. – kavun Oct 10 '15 at 16:01