Updating app config

This particular form of my application I am talking about above allows the admin in the client tool to tell the client tool where that XML file is so that it can read the file and apply its settings.

updating app config-14

Value); App Settings Section app Setting Section = (App Settings Section)config.

This content is outdated and is no longer being maintained.

When you run in the debugger, it will update the application.config file.

When you build your app, it will create the config file.

guration class only works for the User level items.

And, even then, it save the changes into a private copy of the config file in the person's user profile... So, you'll just have to use the "native" XML document methods to replace the XML inside the config file before performing the Save(). so that they won't go into effect until the next time you launch the application.

If you require updateable configuration settings for a Web Forms application or for other application blocks, the best option is to use an external file for the configuration. The following code shows how you can detect changes to Logging Application Block configuration in a custom file named Logging.config.

The following code shows how to save configuration so the section is saved to a detached file; you will need to make sure the config Source value is set before you add the section to the config. ' Usage Private Sub Form1_Load(sender As Object sender, e As Event Args) Dim source As IConfiguration Source = New File Configuration Source("Logging.config") source. Section Name)) End Sub It is important if you use the Add Section Change Handler method to add a handler to a section that you remove it using the Remove Section Change Handler method before the configuration source goes out of scope.

I don't have a C# example handy, but I bet I could find one...

493 Comments

  1. Feeling of impending doom and also fear of death is there.

  2. More » Chatous is another text and/or video chatting website that connects you with random strangers.

  3. Pay per Minute fr 13 Cent Doppelfick, Pornographie Cam 2 Cam Livesex!

Comments are closed.