I have a problem with changing appsettings.json on the asp.net core application that is published on the host, I want to change the settings and restart the app to use new settings. but I don’t know how to restart the app.
in ASP.NET webforms, we change the web.config, and its forces the application to restart. but in asp.net core, it’s not work.
how to restart the application when appsettings.json changes?
2
Answers
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.