Editing Web.config programmatically

前端 未结 7 1264
半阙折子戏
半阙折子戏 2020-12-03 21:57

What is a good way to edit a Web.config file programmatically?

I looked into System.Xml but couldn\'t find any obvious answers.

相关标签:
7条回答
  • 2020-12-03 22:31

    Lot of time you want to modify application specific settings after deployment like say when something is wrong e.g. switching the database connection in case current DB goes down. Moreover sometimes you want to create your own XML based configuration file which you want o modify programatically.

    Try XML Webpad - http://xmlwebpad.codeplex.com/

    Its a framework to view an edit XML files. Once you integrate it with your web app, editing web.config ill be as simple as viewing the web.config page, making the required changes and hitting the save button (all from within your application).

    0 讨论(0)
提交回复
热议问题