When is web.config read?

非 Y 不嫁゛ 提交于 2019-12-30 05:16:26

问题


I'm doing research for an article on the ASP.NET Pipeline, but none of the resources I've covered so far adequately explain when the machine level, and application level, and possibly even sub-application level, web.config files are read.

Also, most of my reading has mislead me to look for default HTTP handlers etc. in machine.config, which seems to, at some point, have been mysteriously replaced by a web.config at the machine level, i.e. in the same config framework folder as machine.config. Are that many articles etc. so out of date, or was this a very recent change? Or, may I be imaginative and consider that the machine level web.config actually 'inherits' from machine.config?


回答1:


The most comprehensive description of how asp.net configration files work that I know of is this one at MSDN:

ASP.NET Configuration File Hierarchy and Inheritance

It is written for the .NET 3.5 framework so the info should be as current as you'll likely find. It describes exactly how the various configuration files are read and merged into the runtime settings for the application in quite a lot of detail.




回答2:


ASP.NET config files work in a hierarchical manner (much the same way as CSS elements).

Configuration Inheritance



来源:https://stackoverflow.com/questions/670633/when-is-web-config-read

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!