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.
27 comments:
Thanks, I just got this error and your explanation was very helpful.
Thanks, it helped!
G.
Thanks for helping with this weird problem!
I had the same problem. This worked like a charm.
Very good, thanks.
Excellent. Thanks for the quick fix!
How about reading the header? Get the same error. Anyone konew of a workaround?
Awesome Thanks a lot,
I spent ages finding a solution to this issue.
Thanks for writing this up, very helpful.
Thnx
Thanks:) Helped:)
Just what I needed - thanks.
thanks!
Thanks!!!!
Thanks!
Great explanation, just what I wanted. Thanks!
or,
you can use response.AppendHeader("key", "value");
response.header is readonly for application.
The meta-tag did solution for the rendering didn't work. So I tried Headers.Add() and got the error you describe.
You saved my ass, thanks for posting this!
Thanks for this post!
Thanks, it was helpful.
It was helpful.
thanks
Thanks for the quick fix!
Hey, thanks for this article, it was a major time saver!
Thanks, it really helped
I am new to .net, and trying to learn the membership class. I am getting the same message when I tried to use the Membership.ValidateUser(). It always failed, and I noticed the following message that was described above. Since I am using the Membership.ValidateUser(), how do I add the the header that would prevent this error message.
Thanks Great jobs................
Post a Comment