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, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft