如何重新启动asp.net core发布的应用程序
在主机上发布的ASP.NET核心应用程序上更改AppSettings.json时,我有一个问题,我想更改设置并重新启动应用程序以使用新设置。但是我不知道如何重新启动该应用程序。
在ASP.NET WebForms中,我们更改Web.config及其迫使应用程序重新启动。但是在ASP.NET核心中,这是行不通的。
AppSettings.json更改时如何重新启动应用程序?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
web.config
in IIS at asp.net core ...Web.config
文件,IIS仍然使用web.config
设置IIS Web-Server设置(in< system.webserver>
)。web.config
文件,然后对其进行一些微不足道的更改(我认为touch web.config
虽然不会起作用)然后IIS将重新启动该网站的应用程序基于该虚拟 - dir或应用程序 - 范围。web.config
in IIS with ASP.NET Core... sort-of:web.config
files anymore, IIS still usesweb.config
to set IIS web-server settings (in<system.webServer>
).web.config
file, then making some insignificant change to it (I don't thinktouch web.config
will work, though) then IIS will restart the website's application based in that virtual-dir or application-scope.您可以停止应用程序,然后手动重新加载页面将再次运行该应用程序。
You can stop the app, and then reloading the page manually will run the app again.