Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Deepak 15 posts 35 karma points
    Sep 21, 2015 @ 09:55
    Deepak
    0

    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

  • Jason 113 posts 627 karma points
    Sep 21, 2015 @ 16:31
    Jason
    0

    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

  • Jason 113 posts 627 karma points
    Oct 05, 2015 @ 16:53
    Jason
    0

    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.

Please Sign in or register to post replies

Write your reply to:

Draft