IIS7 Integrated Pipeline - Response.End not ending the request.

Posted by MikeGurtzweiler on Stack Overflow See other posts from Stack Overflow or by MikeGurtzweiler
Published on 2010-03-23T21:18:58Z Indexed on 2010/03/23 21:23 UTC
Read the original article Hit count: 673

I have the following bit of code that worked as expected before we upgraded to Integrated Pipeline in IIS7.

public void RedirectPermanently(string url, bool clearCookies)
{
  Response.ClearContent();
  Response.StatusCode = 301;
  Response.AppendHeader("Location", url);
  if(clearCookies)
  {
    Response.Cookies.Clear();
    Response.Flush();
    Response.End();
  }
}

Previously when this method was executed, if clearCookies was true, the response would be sent to the client and request processing would end. Now under Integrated Pipeline Response.End() does not seem to end processing. The page continues running as if the method was never called.

Big question is, why and what changed!

Thanks.

© Stack Overflow or respective owner

Related posts about iis7

Related posts about integrated-pipeline-mode