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

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

filehandler - java open files not cleaned, even when the process is killed -

java - Suppress Jboss version details from HTTP error response -