Difference between lt;system.webgt; and lt;system.webServergt;?(lt;system.webgt; 之间的区别和lt;system.webServergt;?)
问题描述
每次我必须为带有 IIS7 的 ASP.NET 添加处理程序或模块时,说明总是告诉我将其合并到两个部分:system.web
和 system.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.
这篇关于<system.web> 之间的区别和<system.webServer>?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:<system.web> 之间的区别和<system.webServer>?


- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- 输入按键事件处理程序 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01