且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在不停止Web服务器的情况下在现有/正在运行的站点上更新ASP.NET Core应用程序?

更新时间:2022-11-06 16:46:43

使用IIS运行时,可以将名为 app_offline.htm 的文件(区分大小写)拖放到应用程序文件夹中。 IIS将停止您的应用程序,并将提供 app_offline.html 文件的内容。现在您可以复制您的申请。完成后删除app_offline.html,IIS将启动您的应用。 docs 中对此进行了描述。以及我的帖子

When running with IIS you can drop a file called app_offline.htm (case sensitive) to your application folder. IIS will stop your application and will serve the contents of the app_offline.html file. Now you can copy your application. Once finished remove the app_offline.html and IIS will start your app. This is described in the docs and also in my post on running Asp.NET Core apps with IIS.