【发布时间】:2012-08-23 08:45:23
【问题描述】:
下面这一切究竟意味着什么。我正在运行一个异步 Web 请求,该请求调用一个将代码发送到我的数据库的页面。然后我的数据库启动一个存储过程,该过程运行到我的一个 SQL 程序集中。大多数时候它有效,但有时我得到这个:
线程被中止。
说明:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详细信息:System.Threading.ThreadAbortException:线程被中止。
来源错误:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
堆栈跟踪:
[ThreadAbortException: Thread was being aborted.]
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +486
System.Web.ApplicationStepManager.ResumeSteps(Exception error) +501
System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +123
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +379
【问题讨论】:
-
错误就是所说的。执行请求的线程正在被中止,因此您的代码将不会被执行。您需要提供更多详细信息和代码示例以了解为什么会发生这种情况。
-
问题是我不确定我确切地知道代码在哪里,在网络应用程序还是我的程序集中?
-
当你说大部分时间它运行良好时,需要多长时间,听起来它只是运行太慢或某些资源被锁定所以线程执行时间达到红线等等。网杀了它
标签: c# asp.net .net sql-server sql-server-2005