IIS6 + HttpModule:该操作需要IIS集成管道模式

发布于 2024-07-07 12:45:33 字数 112 浏览 3 评论 0原文

我使用的是 IIS6,我编写了一个 HttpModule,但出现此错误? 谷歌搜索后发现这个问题是由.NET Framework 3.5引起的,所以我把它放在没有安装.NET 3.5的机器上,但问题仍然存在!

I am using IIS6, I've written an HttpModule, and I get this error? After googling the web I find that this problem is caused by the .NET framework 3.5, so I put this on a machine where I didn't install .NET 3.5, but the problem is still there!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

时光暖心i 2024-07-14 12:45:34

我尝试进行心理调试:您使用的语句如下:

Response.Headers("X-Foo") = "bar"

如果确实是这种情况,则按如下所示进行更改将解决该问题:

Response.AddHeader("X-Foo", "bar")

My attempt at psychic debugging: you're using a statement like:

Response.Headers("X-Foo") = "bar"

If this is indeed the case, changing this as shown below will work around the problem:

Response.AddHeader("X-Foo", "bar")
不甘平庸 2024-07-14 12:45:34

仅IIS7支持集成管道。 在 IIS7 上,HttpModule 可以参与传入 Web 服务器的所有请求,而不仅仅是针对特定文件扩展名的请求。

II6 使用 IIS7 所称的经典管道,其中只有当早期基于 ISAPI 的管道确定脚本映射需要将请求移交给 ASP.NET 时,HttpModule 才能参与其中。

Only IIS7 supports the integrated pipeline. On IIS7 a HttpModule can participate in all requests coming to the web server not just those targeting specific file extensions.

II6 uses what IIS7 calls the classic pipeline where a HttpModules can only get involved once the earlier ISAPI based pipeline determines that the script mapping requires the request to handed over to ASP.NET.

梦纸 2024-07-14 12:45:34

刚刚遇到这个问题。 使用 IIS6 和 .NET 3.5。 对我来说,修复方法是使用 Response.AddHeader 而不是 Response.Headers.Add。 HTH。

Just came across this problem. Using IIS6 and .NET 3.5. Fix for me was to use Response.AddHeader instead of Response.Headers.Add. HTH.

梦幻的味道 2024-07-14 12:45:34

受其他答案的启发,我发现它访问 Response.Headers 对象会导致“操作需要 IIS 集成管道模式”异常。

避免 .Headers 并调用其他(较旧的?)辅助函数,例如:

  • Response.AddHeader()
  • Response.ClearHeaders() (在我的例子中!)

Inspired by other answers, I've found that it's accessing the Response.Headers object that causes the "operation requires IIS integrated pipeline mode" exception.

Avoid .Headers and call other (older?) helper functions like:

  • Response.AddHeader() and
  • Response.ClearHeaders() (in my case!)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文