Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 492
Nil Pun Avatar asked Jan 17 '12 21:01

Nil Pun


People also ask

Does changing web config reset the application?

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.

What is the importance of web config file?

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).

What happens when you change the web config file at run time?

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.

What is difference between web config and app config?

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.


1 Answers

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.

like image 156
kprobst Avatar answered Oct 13 '22 12:10

kprobst