Seamless deployment in ASP.NET (IIS kills worker process before new worker process is ready)

前端 未结 5 1135
孤城傲影
孤城傲影 2021-01-30 18:41

I am trying to deploy a .NET Web application to IIS (7.5) without any hassle for the users. I have made sure that Disable Overlapped Recycle is False b

5条回答
  •  再見小時候
    2021-01-30 19:37

    When deploying ASP.Net applications I create a new folder on the server and change the home directory of the website within IIS. This provides zero downtime deployment and a quick rollback position in case of unforeseen issues. On a future update I scrap the old version and repeat the process so that there is always a single rollback position.

    Update - Shutdown time limit

    Details configuring the shutdown time limit for workers is detailed at http://www.iis.net/ConfigReference/system.applicationHost/applicationPools/add/processModel. The default is 1 min 30 secs. Look for the shutdownTimeLimit section in the linked page.

    Update - More information

    Similar question with a great answer

    The gist of this is that the due to overwritting the existing files the copying mechanism takes an exclusive lock on the files and that it is not possible to have seemless deployment without use of app_offline.htm or a mechanism such as suggested above. Take a read of the linked answer as it goes into much more depth.

提交回复
热议问题