We all know that modifying a .NET web application's web.config file restarts the app and makes it read the updated configuration. How do you do that with a console or WinForms app? Thanks :)
To reload Config, select the loaded configurations you want to reload and click Reload. You can only reload a configuration that has the status of Loaded. To refresh Configs, click Refresh. Information for all of the configs in the table is redisplayed.
When you edit the web. config, It will restart the AppDomain (NOT AppPool) of that web application and clears the all occupied resources and memory.
One is "Web. config" which is used for configuring the settings for a Web application and the other is "App. config" used for Windows application settings. Any changes made to the Web.
Probably need a FileSystemWatcher to monitor the file, and handle the relevant event. The System.Configuration.ConfigManager class might have the relevant methods to reload (method call or some such). I don't have VS in front of me, but I'd say there's definately some hooks there for sure.
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