문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top