Showing posts with label Bug. Show all posts
Showing posts with label Bug. Show all posts

Wednesday, February 20, 2008

This operation requires IIS integrated pipeline mode







If you're getting an error message

This operation requires IIS integrated pipeline mode

when trying to add headers to a HttpResponse object in an ASP.Net web application, chances are you're trying something like this:

response.Headers["myHeader"] = "someValue";

or

response.Headers.Add("myHeader", "someValue");

A quick Google reveals mentions of bugs in the 3.5 framework, but I'm using .Net 2. Nevertheless you can work around this problem by adding your header this way instead:

response.AddHeader("myHeader", "someValue");

And your code should now add the header successfully.