简体   繁体   English

线程正在中止

[英]Thread is being aborted

What exactly does all this mean below. 这在下面到底意味着什么。 I am running an asynchronous web request that calls a page that sends code to my database. 我正在运行一个异步Web请求,该请求将调用将代码发送到数据库的页面。 Then my database fires off a stored procedure that runs into one of my SQL assemblies. 然后,我的数据库触发了运行到我的一个SQL程序集中的存储过程。 Most times it works, but sometimes I get this: 在大多数情况下,它都能正常工作,但有时我会得到:

Thread was being aborted. 威胁已经被清除了。

Description: An unhandled exception occurred during the execution of the current web request. 说明:执行当前Web请求期间发生未处理的异常。 Please review the stack trace for more information about the error and where it originated in the code. 请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。

Exception Details: System.Threading.ThreadAbortException: Thread was being aborted. 异常详细信息:System.Threading.ThreadAbortException:线程正在中止。

Source Error: 源错误:

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.

Stack Trace: 堆栈跟踪:

[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

The reason why you are getting this error most likely is that you are getting timed out. 您最有可能收到此错误的原因是您超时了。 Increase the ExecutionTimeout since at default its 110 seconds. 增加ExecutionTimeout,因为默认情况下为110秒。

<compilation debug="false"></compilation>
<httpRuntime executionTimeout="1800"/> //1800 seconds / 30 minutes. 

Here's an article that goes more into detail as to how to increase the ExecutionTimeout. 这是一篇详细介绍如何增加ExecutionTimeout的文章。

The app domain could be getting recycled which can happen for a number of reasons. 应用程序域可能会被回收,这可能有多种原因。 That can cause a thread abort exception. 这可能导致线程异常中止。

Here is an article which explains some of the reasons for a recycle 这是一篇文章,解释了回收的一些原因

If a process is long running, IIS/ASP.Net is not usually a good place to run it. 如果一个进程长期运行,IIS / ASP.Net通常不是运行它的好地方。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM