正在中止线程 [英] Thread was being aborted
本文介绍了正在中止线程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的 Server.Transfer的。一切工作正常,但例外日志中显示以下异常。
I am using Server.Transfer. Everything works fine, but exception log shows following exception.
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at System.Web.HttpServerUtility.Transfer(String path)
任何想法,以避免上述例外。
Any idea to avoid above exception.
推荐答案
这例外是抛出通过调用 Server.Transfer的
,以制止目前的执行方法 - 正好,如果你做同样的事情被抛出的Response.Redirect
This exception is throw by the call to Server.Transfer
in order to halt the execution of the current method - exactly the same thing gets thrown if you do Response.Redirect
.
你有两个选择是:
- 捕捉并重新抛出
ThreadAbortException / reperform的Server.Transfer的
- 请确保您
只做Server.Transfer的
的地方
它不会被抓(推荐)
编辑:从头开始, http://support.microsoft.com/kb/312629一>有几个其他建议去尝试,但我还是建议上述第2条。
Scratch that, http://support.microsoft.com/kb/312629 has a couple of other suggestions to try, but I still recommend #2 above.
这篇关于正在中止线程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文