c# - comments are getting deleted while updating the web config file programmatically -


comments , keys getting deleted while updating web.config problematically

string path = configurationmanager.appsettings["path"]; var map = new execonfigurationfilemap { execonfigfilename = path }; var configfile = configurationmanager.openmappedexeconfiguration(map, configurationuserlevel.none); configfile.appsettings.settings["strkeyname"].value = convert.tostring(intvalue); configfile.save();  

may know why happening that, want retain comments .please let me know how can achieve it.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -