Modify web.config appsettings value

var config = WebConfigurationManager.OpenWebConfiguration("~");
var section = (AppSettingsSection)config.GetSection("appSettings");
section.Settings["something"].Value = "newValue";
config.Save();

Comments

Popular posts from this blog

C# Record Serialization

Add timestamp to photo using ImageMagick

Read/write large blob to SQL Server from C#