Export (0) Print
Expand All

HttpContext.ThreadAbortOnTimeout Property

.NET Framework 4.5

Gets or sets a value that specifies whether the ASP.NET runtime should call Thread.Abort on the thread that is servicing this request when the request times out.

Namespace:  System.Web
Assembly:  System.Web (in System.Web.dll)

public bool ThreadAbortOnTimeout { get; set; }

Property Value

Type: System.Boolean
true if Thread.Abort will be called when the thread times out; otherwise, false. The default is true.

In handlers and modules that are using the HttpRequest.TimedOutToken property to implement cooperative cancellation, you might wish to disable the Thread.Abort behavior that ASP.NET performs by default when a request times out. Setting this property to false can help you make sure that cancellation and cleanup routines will run without being interrupted by ASP.NET.

If you set this property to false, ASP.NET will not automatically display a "Request timed out" error page when a timeout occurs. The application is responsible for setting the response content appropriately.

.NET Framework

Supported in: 4.6
Show:
© 2014 Microsoft