Steve Andrews

passionate technologist · business applications · community guy

This operation requires IIS integrated pipeline mode

I’ve been working on a few ASP.NET MVC demos recently, one of which uses a custom ActionResult to send an iCal file back to the user. As part of the custom ActionResult I add a Content-Disposition header to the reply so the user is prompted to download the file.

When I went to test the code in the browser however (Ctrl+F5), I received a “This operation requires IIS integrated pipeline mode” exception. What makes this particularly interesting is that I am not running in IIS, but rather the out-of-the-box ASP.NET Development Server that comes with Visual Studio so I don’t have control over the “pipeline mode”. Initially searching didn’t turn up anything helpful either.

It turns out that the answer is really quick and easy; simply change:

response.Headers.Add(…)

to

response.AddHeader(…)

Comments (3) -

  • Dude

    9/2/2013 4:53:56 PM |

    kick it


  • Jack Bradford

    9/2/2013 4:53:56 PM |

    It's worth noting that using the AddHeader() method sends both the original and the new header.


    This hasn't been a problem until the recent release of Chrome 16 which throws an error when it receives duplicate headers (presumably as a security feature).


  • Gauri

    9/2/2013 4:53:56 PM |

    Hi, I too am getting this error while downloading a remote file from server, using .net4.0 and IIS 5.1. I am using AddHeader method, still no use. Can you give any clue if some thing else can fix this? Thanks.


Pingbacks and trackbacks (2)+

Comments are closed