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

From: Brad Shook (bshook_at_echd.org.removeme)
Date: 10/18/04


Date: Mon, 18 Oct 2004 15:42:21 -0500

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
"Jorge Besada" <jbesad01@yahoo.com> wrote in message
news:1704645d.0410181101.76b652f2@posting.google.com...
> 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



Relevant Pages

  • Re: Q: app.config and Windows Service.
    ... M> I created a .settings file and added some values. ... M> When i load my windows service i can read from the .config file. ... team blog: http://devkids.blogspot.com/ ...
    (microsoft.public.dotnet.languages.csharp)
  • config file
    ... I am trying to develop a small app that will populate a pulldown from ... information that is stored in a application config or settings file. ...
    (microsoft.public.dotnet.languages.vb)
  • config file
    ... I am trying to develop a small app that will populate a pulldown from ... information that is stored in a application config or settings file. ...
    (microsoft.public.vb.general.discussion)
  • Re: Where to store config information?
    ... It's a bit bizarre really - it looks like the new ConfigurationManager class is a lot less powerful and flexible at handling these XML config files than the old ConfigurationSettings class. ... so it must be possible to create groups/hierarchies of settings in the app config file using the new ConfigurationManager class somehow. ...
    (microsoft.public.dotnet.framework)
  • Re: Dynamicaly updating a .config file
    ... When updating the .config using ConfigurationManager class, ... You could load the connection string into a global variable, and then all connections read from the variable instead of the config. ...
    (microsoft.public.dotnet.framework.windowsforms)