IIS6 + HttpModule: This operation requires IIS integrated pipeline mode

送分小仙女□ 提交于 2019-11-27 03:11:26

问题


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!


回答1:


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")



回答2:


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.




回答3:


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.




回答4:


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!)


来源:https://stackoverflow.com/questions/186548/iis6-httpmodule-this-operation-requires-iis-integrated-pipeline-mode

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!