Building a simple asp.net Editor for Web Configura

Source: Internet
Author: User
Tags configuration settings
In this article, a simple web based editor was built for the web.config file of asp.net. This article would cover the basics of the new Web.config file structure, as as is as helping the reader to understand the C Onfiguration file hierarchy of the. NET environment. It would also demonstrate how the XmlDocument object and its methods are used to simply load, modify, and write out XML fro M A. aspx page. The final code download is a simple Web configuration file Editor This allows a user to change the configuration settings of a Web application through another Web application without needing to have explicit knowledge of the Web.config file a D it ' s format. Code Design Motivation
In order to edit the Web.config file through the Web, the page performing the configuration work needs to be in a separate Web application or application Domain from the Web application to which it is changing the configuration settings. This is because to the way ASP.net deals with configuration file changes. Recall from the explanation above, which is ASP.net detects changes in the Web.config file, it reconfigures itself ing to those changes, but allows current requests to finish using the current configuration settings. Given this, it follows that the file performing the configuration would benefit from not changing with the new along Ration settings, as it becomes hard to detect the new changes. This isn't to say the simple Web Configuration tool'll only work in it ' s own application domain, but results Ppear non deterministic at the times, and therefore a bit more difficult to debug.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.