I tried to send a file back to the browser through an HTTP handler in ASP.NET, but came up with a "This operation requires IIS integrated pipeline mode" on the line where I'm setting the content-disposition header. It seemed quite odd because I was doing something similar in a previous ASP.NET application. After a bit of Googling, I came across the solution...
Using "context.Response.Headers.Add" was the culprit. I replaced the "context.Response.Headers.Add" with a "context.Response.AddHeader" and voila! Works like a charm.
Subscribe to:
Post Comments (Atom)
4 comments:
ouch, I did the same, and this helped me :) thanks
Considering how all the other classes are designed (such as Controls.Add or Items.Add), I thought Headers.Add seemed like the one I had to use.
Apparently not.
I am also facing the same problem but the method you told is not solving my problem
I am getting the error on very first line
Response.clear();
Thank you, it saved me a day
Post a Comment