【发布时间】:2014-07-26 09:02:47
【问题描述】:
我们被告知该网站有以下错误:
Exception Thread was being aborted., , at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
调查后发现应该修改重定向方式。
当前代码:Response.Redirect(URL)
应通知为:Response.Redirect(URL, false)
这确实解决了问题,微软也建议:http://support.microsoft.com/kb/312629/en-us
但是我们也遇到了以下代码:
response.Flush();
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.SuppressContent = true;
HttpContext.Current.ApplicationInstance.CompleteRequest();
参考:http://dotnetplussqlserver.blogspot.in/2014/01/excel-download-responseend-throwing.html
有人可以帮助我们澄清哪种方法更好吗?一个比另一个有什么意义? 我们只想要简单的重定向。
谢谢。
【问题讨论】:
标签: c# asp.net multithreading