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>?
基础教程推荐
- 从 C# 控制相机设备 2022-01-01
- 将数据集转换为列表 2022-01-01
- 在 VB6 或经典 ASP 中使用 .NET 2022-01-01
- 如果条件可以为空 2022-01-01
- Mono https webrequest 失败并显示“身份验证或解密失败" 2022-01-01
- 获取C#保存对话框的文件路径 2022-01-01
- SonarQube C# 分析失败“不是指针的有效行偏移" 2022-01-01
- 更新 Visual Studio 中的 DataSet 结构以匹配新的 SQL 数据库结构 2022-01-01
- C# 9 新特性——record的相关总结 2023-04-03
- 重新排序 WPF TabControl 中的选项卡 2022-01-01
