App.Config

  • Thread starter Thread starter Bar Elimelech
  • Start date Start date
B

Bar Elimelech

Hi All,



I've wrote a windows service, and I'm trying to find a way to reload the
app.config <add> tags at runtime.

It looks like the dot net framework does not support it in any way.



Please replay if you know how can I do it.



Thanks

Bar
 
I don't think you can do that. I believe the file is parsed when the app
domain first loads and it's never actually looked at again.

You could always use an INI file or a custom XML file with your settings and
load it whenever you want. App.config is bad in any case, especially for
applications that require per-user settings (as opposed to machine-specific
ones).
 
Klaus,



Thanks for you fast replay, the thing is I'm not going to change the
app.config file very often, but my main problem is to change it on the
production server and I believe everybody have to do it sometime J.

Are you sure Microsoft did not come up with a solution to this problem, I’m
sure lots of developers faced this problem before I did and it should be
very common thing.



Thanks

Bar
 
Well a Google search doesn't turn up anything interesting other than
recommendations to use something else or unload the application.
 
Back
Top