IIS6 + HttpModule: This operation requires IIS integrated pipeline mode

后端 未结 4 913
半阙折子戏
半阙折子戏 2020-12-10 02:22

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

相关标签:
4条回答
  • 2020-12-10 02:24

    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")
    
    0 讨论(0)
  • 2020-12-10 02:32

    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.

    0 讨论(0)
  • 2020-12-10 02:51

    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.

    0 讨论(0)
  • 2020-12-10 02:51

    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!)
    0 讨论(0)
提交回复
热议问题