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

posted on 2016-10-11 20:36  李军浩  阅读(175)  评论(0编辑  收藏  举报

导航