reloading app.config in Configuration Management Application Block ???

  • Thread starter Thread starter Jorge Besada
  • Start date Start date
J

Jorge Besada

I am planning on using the Configuration Management Application Block.
The Block reads the app.config file the first time it is used. What if
I want to add a new section/configSection and have the
ConfigurationManager class reload the new app.config settings. Can
this be done? I am not interested in having my application be notified
that the settings file it is using has been changed. I am interested
in reinitializing the ConfigurationManager class once the app.config
file changes. Thanks
 
I would not reccomend doing this. the app.comfig file was not really
designed to be modified in code after the program is installed and running.
It can be done but it very difficult. The only way I knoe how to do it is
load the config file into an xml document, make the changes and save it back
over the config file. I have seen example of this on Google groups. try
searching for vb.net change application.config file in code.
I would recomend using a simple ini file.

Brad Shook
 
Back
Top