web.config in asp.net -
I want to give the username, password, and API's value in web.config that is coming from the database. Set username, password, APIkey, which is to be set in web.config
Private Zero UpdateConfig (string strkey, string strValue) {configuration objConfig = WebConfigurationManager.OpenWebConfiguration ("~"); AppSettingsSection objAppsettings = (AppSettingsSection) objConfig.GetSection ("appSettings"); If (objAppsettings! = Null) {objAppsettings.Settings [strkey] .Value = strValue; ObjConfig.Save (); }}
But every time you update the web.config file, your application will restart the domain, so updating the web is not often configured.
View Pls:
Comments
Post a Comment