HttpResponse.Redirect偶尔抛异常(Thread was being aborted)
代码:Response.Redirect(aimurl);
异常信息:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.AbortCurrentThread()
at System.Web.HttpResponse.End()
at System.Web.HttpResponse.Redirect(String url, Boolean endResponse, Boolean permanent)
at System.Web.HttpResponse.Redirect(String url)
at UcarAdmin2011.Login.loadLoginUserInfo(Int32 userId, String domainAccount)
解决方式:
Response.Redirect(aimurl,false);
参考文档:https://support.microsoft.com/en-us/kb/312629