其他分享
首页 > 其他分享> > redirect thread aborted

redirect thread aborted

作者:互联网

Why Response.Redirect causes System.Threading.ThreadAbortException?

The correct pattern is to call the Redirect overload with endResponse=false and make a call to tell the IIS pipeline that it should advance directly to the EndRequest stage once you return control:

Response.Redirect(url, false);
Context.ApplicationInstance.CompleteRequest();

This blog post from Thomas Marquardt provides additional details, including how to handle the special case of redirecting inside an Application_Error handler.

 

标签:redirect,Redirect,false,thread,System,correct,call,aborted,Response
来源: https://www.cnblogs.com/chucklu/p/10955134.html