最新下载
热门教程
- 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.
相关文章
- 碧蓝航线的里雅斯特期待的便当时间皮肤有什么 04-30
- 明日之后踏浪逐星服装展示攻略 04-30
- 深空之眼幽月塞勒涅刻印搭配核心思路 04-30
- 明日之后红杉茶会护卫队首领BOSS有哪些 04-30
- CF手游段位奖励汇总攻略 04-30
- 无期迷途5-13怎么走攻略 04-30