Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpContext::ThreadAbortOnTimeout Property

.NET Framework (current version)
 

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:
property bool ThreadAbortOnTimeout {
	bool get();
	void set(bool value);
}

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
Available since 4.5
Return to top
Show:
© 2017 Microsoft