如何在不停止应用程序的情况下发布asp.net核心应用程序Dlls [英] How to publish asp.net core app Dlls without having to stop the application

查看:72
本文介绍了如何在不停止应用程序的情况下发布asp.net核心应用程序Dlls的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过Filezilla工具使用ftp发布.net核心应用Dlls时,它显示一条错误消息,指出该文件正在被另一个进程使用.

When i try to publish the .net core app Dlls using ftp via filezilla tool it shows an error message that the file is in use by another process.

上面的消息显示是可以理解的,因为该文件由dotnet.exe使用,这是一个单独的过程.

It's understandable that the above message shows because the the file is used by dotnet.exe which is a separate process.

要解决此问题,我必须每次在iis中停止该应用程序,然后上传dll,然后重新启动它.由于经历了非常短的停机时间,因此asp.net身份会话会过期,并且每次需要上载时都需要rdp到服务器.

To overcome the issue i have to stop the application in iis each time then upload the dlls and then restart it. Due to which a very small down time is experienced , the asp.net identity session expires and it needs rdp to the server each time upload is needed.

与asp.net mvc相比,这不是一个平稳的体验,在asp.net mvc中,我们可以直接发布文件而无需RPD或执行一些手动操作.

It's also not smooth experience in comparison to asp.net mvc where we could publish the files directly without need to RPD or do some manual action.

任何解决上述问题的方法或解决方案将不胜感激.

Any work around or solution to overcome to the above issues will be appreciated.

推荐答案

找到解决方案.

可以通过 app_offline.html 文件完成.

您必须将app_offline.html文件移动到应用程序的根文件夹中,以停止/使应用程序脱机.

You have to move the app_offline.html file to application root folder to stop/make offline the application.

然后,您可以推送更改并从应用程序根文件夹中删除app_offline.html文件.

Then you can push your changes and remove the app_offline.html file from application root folder.

注意:您可以在app_offline.html文件中放入一些提示性消息,该消息将向用户显示正在进行维护.

Note: You can put some informative message in the app_offline.html file which will be shown to user that maintenance is on progress.

这篇关于如何在不停止应用程序的情况下发布asp.net核心应用程序Dlls的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆