in

Platinum Bay

Peace, Love, and...

This Blog

Syndication


.NETicated

October 2010 - Posts

  • 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(…)
Powered by Community Server (Commercial Edition), by Telligent Systems
© Platinum Bay | Some Rights Reserved Creative Commons License

Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or annonymous comments) - so keep it polite, please.