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.
Editing the web. config in a web application only affects that web application (recycles just that app), so it doesn't require a reset to IIS. It just impacts that particular application and reloads the app domain.
A web. config file is a Windows file that lets you customize the way your site or a specific directory on your site behaves. For example, if you place a web. config file in your root directory, it will affect your entire site (www.coolexample.com).
the answer i found :- ASP.NET invalidates the existing cache and assembles a new cache. Then ASP.NET automatically restarts the application to apply the changes.
The web. config file is required for ASP.NET webpages. The app. config file is optional in an application and doesn't have to be used when writing desktop applications.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With