w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Updating a config file adds additional config sections

Try changing the ConfigurationSaveMode from

ConfigurationSaveMode.Minimal 

to

ConfigurationSaveMode.Modified

Modified only saves the properties that you have changed.

From MSDN:

Full
Causes all properties to be written to the configuration file. This is useful mostly for creating information configuration files or moving configuration values from one machine to another.

Minimal
Causes only properties that differ from inherited values to be written to the configuration file.

Modified
Causes only modified properties to be written to the configuration file, even when the value is the same as the inherited value.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.