<system.web> 之间的区别和<system.webServer>? [英] Difference between <system.web> and <system.webServer>?

查看:16
本文介绍了<system.web> 之间的区别和<system.webServer>?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我必须为带有 IIS7 的 ASP.NET 添加处理程序或模块时,说明总是告诉我将其合并到两个部分:system.websystem.webserver.

Every time I have to add a handler or module for ASP.NET with IIS7, the instructions always tell me to incorporate it into two sections: system.web and system.webserver.

<system.web>
    <httpHandlers>
    </httpHandlers>
    <httpModules>
    </httpModules>
</system.web>

还有这个:

<system.webServer>
    <modules>
    </modules>
    <handlers>
    </handlers>
</system.webServer>

这两个部分有什么区别?

What is the difference between these two sections?

此外,如果我不将其添加到 system.web 部分,我的 Visual Studio 2008 调试器也无法正常工作.

In addition, if I don't add it to the system.web section, my Visual Studio 2008 debugger also doesn't work correctly.

推荐答案

system.web部分用于配置IIS 6.0,system.webserver版本用于配置IIS 7.0.IIS 7.0 包括一个新的 ASP.NET 管道和一些配置差异,因此有额外的配置部分.

The system.web section is for configuring IIS 6.0, while the system.webserver version is used to configure IIS 7.0. IIS 7.0 includes a new ASP.NET pipeline and some configuration differences, hence the extra config sections.

不过……

如果您仅在集成模式下运行 IIS 7.0,则不需要将处理程序添加到这两个部分.将它添加到 system.web 也是 IIS 7.0 在经典模式下运行的后备,除非我弄错了.我还没有对此进行广泛的测试.

If you're running IIS 7.0 in integrated mode only, you shouldn't need to add the handlers to both sections. Adding it to system.web as well is a fallback for IIS 7.0 operating in classic mode, unless I'm mistaken. I've not done extensive testing on this.

请参阅 http://msdn.microsoft.com/en-us/library/bb763179.aspx 了解更多信息.

See http://msdn.microsoft.com/en-us/library/bb763179.aspx for more information.

这篇关于&lt;system.web&gt; 之间的区别和&lt;system.webServer&gt;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆