最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Building a Simple ASP.NET Editor for Web Configura
时间:2022-07-02 12:14:06 编辑:袖梨 来源:一聚教程网
In this article, a simple web based editor is built for the web.config file of ASP.NET. This article will cover the basics of the new web.config file structure, as well as helping the reader to understand the configuration file hierarchy of the .NET environment. It will also demonstrate how the XmlDocument object and its methods are used to simply load, modify, and write out XML from a .aspx page . The final code download is a simple web configuration file editor that 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 and 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 for which it is changing the configuration settings. This is because of the way ASP.NET deals with configuration file changes. Recall from the explanation above, that when ASP.NET detects changes in the web.config file, it reconfigures itself according 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 by not changing along with the new configuration settings, as it becomes hard to detect the new changes. This is not to say that the simple web configuration tool will only work in it's own application domain, but results may appear non deterministic at times, and therefore a bit more difficult to debug.
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 for which it is changing the configuration settings. This is because of the way ASP.NET deals with configuration file changes. Recall from the explanation above, that when ASP.NET detects changes in the web.config file, it reconfigures itself according 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 by not changing along with the new configuration settings, as it becomes hard to detect the new changes. This is not to say that the simple web configuration tool will only work in it's own application domain, but results may appear non deterministic at times, and therefore a bit more difficult to debug.
相关文章
- 模拟山羊3抱树者位置在哪-模拟山羊3抱树者在哪里 09-18
- 明日方舟2025新春前瞻直播多久开始-2025新春前瞻直播开启时间介绍 09-18
- 纳萨力克之王护盾队怎么配队-纳萨力克之王护盾队配队攻略 09-18
- 七日世界月之预兆异常物有哪些-月之预兆版本新增异常物一览 09-18
- 王者荣耀2024FMVP皮肤是谁的-2024FMVP皮肤介绍 09-18
- 鸣潮赞妮武器选什么-鸣潮赞妮武器推荐 09-18