<system.web> 之间的区别和<system.webServer>?

Difference between lt;system.webgt; and lt;system.webServergt;?(lt;system.webgt; 之间的区别和lt;system.webServergt;?)
本文介绍了<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;?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
how do i pass parameters to aspnet reportviewer(如何将参数传递给aspnet report查看器)
Bind multiple parameters from route and body to a model in ASP.NET Core(在ASP.NET Core中将路由和主体中的多个参数绑定到一个模型)
Custom model binding in AspNet Core WebApi?(AspNet Core WebApi中的自定义模型绑定?)
How to minify in .net core mvc view?(如何在.Net核心MVC视图中缩小?)