Refreshing .config

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm overwriting appSettings in the .config using the XMLDocument object and then saving through. While this works fine the changes aren't visible ti my application until it restarts.

Is there any way that I can refresh the config file while the application is running?

Cheers,

Eldon Ferran de Pol
 
Check out following article:
....
For other application types, such as Windows Forms or console applications,
there is a definite downside. Any change to our configuration settings
requires that the application be stopped and restarted. We can overcome this
by adding a bit of extra functionality to our custom section handler. It is
possible to create a custom section handler that detects when the config
file is changed. If this happens, we can refresh our settings values by
re-reading the custom section from the file.
....

http://tinyurl.com/2kdvm

--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan


Eldo nFerran de Pol said:
I'm overwriting appSettings in the .config using the XMLDocument object
and then saving through. While this works fine the changes aren't visible
ti my application until it restarts.
 
Thank you very much for the reply. After much hunting prior to posting I had found nothing. About three minutes after posting I found that very article

Thanks again

Eldon
 
Back
Top