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!
-
Could you elaborate on what your module is doing? – AnthonyWJones Oct 09 '08 at 09:49
-
check the if the user's password is exprided then force he to change it. – sdhjl2000 Oct 09 '08 at 10:28
-
You need to provide code showing where the error occurs. – Kevin P. Rice Jul 17 '11 at 19:02
4 Answers
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")

- 52,000
- 11
- 64
- 62
-
Will `response.Headers.Location = new Uri(...);` break IIS6 and give a 500 `Internal Server Error`? – Blaise Aug 14 '13 at 19:58
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.

- 187,081
- 35
- 232
- 306
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.

- 1,949
- 4
- 29
- 49
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()
andResponse.ClearHeaders()
(in my case!)

- 530
- 4
- 10