I've created a screen on my web application that will allow super administrators change values of parameters on Web.Config.
The problem
One time we change the values of parameters using that code users connected to the applications have to refreshed it! I would like to know if that's a good idea >
The code:
public void SetAppSettings(string key, string value)
{
Configuration objConfig = WebConfigurationManager.OpenWebConfiguration("~");
objConfig.AppSettings.Settings[key].Value = value;
objConfig.Save(ConfigurationSaveMode.Full )
}
Why the application is KO changing web.config.
Normally when web.config is changed it forces the application to recycle. This resets the session and cache objects. If a user is in the middle of something then it can be lost.