Search code examples
c#asp.netwindows-services

Impacts of web.config and app.config changes


I've a Windows Services written in c#.net. If I need to change the app.config file, do I need to restart the Windows Service application so that it picks up the new changes?

Also, if I change the web.config connection string does app pool gets started automatically?

Thanks.


Solution

  • The answer to the first question is yes. Unless you implement some kind of automatic file watcher plus domain restart scheme, yes, app.config files for services or other types of apps need to be re-read in order for changes in them to be applied.

    As for the second, yes, ASP.NET will detect changes to web.config files and reload the app domain automatically.