Thank you for reporting this issue. Seems that this behavior is by Microsoft design. The WebConfigurationManager.Save() method removes comments, which is a stupid behavior if you ask me and one that I was not aware of until now.
I will rework how the web.config gets save, but I will not have time until later this week. I will post here when I am done. Thanks again for taking the time to let me know.
Sorry it took so long, I just uploaded version 1.1. I updated the plugin to use XmlDocument instead of WebConfigurationManager. This should solve the issue of comments under the AppSettings node being removed, seem that comment outside of the AppSetting node were not touched. Not a bug just an undesirable behavior of the WebConfigurationManager class.
Plugin delete the comments in web.config file
Hello Json,
This plugin is really simple and awesome.
But when I run this tool using CMS developer section , it delete all comments from config file.
Could you please fix this issue ?
Thanks
Thank you for reporting this issue. Seems that this behavior is by Microsoft design. The WebConfigurationManager.Save() method removes comments, which is a stupid behavior if you ask me and one that I was not aware of until now.
I will rework how the web.config gets save, but I will not have time until later this week. I will post here when I am done. Thanks again for taking the time to let me know.
JT
Sorry it took so long, I just uploaded version 1.1. I updated the plugin to use XmlDocument instead of WebConfigurationManager. This should solve the issue of comments under the AppSettings node being removed, seem that comment outside of the AppSetting node were not touched. Not a bug just an undesirable behavior of the WebConfigurationManager class.
is working on a reply...