Export (0) Print
Expand All

HttpRequest.TimedOutToken Property

.NET Framework 4.5

Gets a CancellationToken object that is tripped when a request times out.

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

Public ReadOnly Property TimedOutToken As CancellationToken

Property Value

Type: System.Threading.CancellationToken
The cancellation token.

The timeout period can be specified in the Web.config file (see HttpRuntimeSection.ExecutionTimeout) or programmatically (see HttpServerUtility.ScriptTimeout). The timeout period is measured from the time the request comes in. If the default timeout of 110 seconds is in effect, the cancellation token will be tripped no earlier than 110 seconds after request processing begins. You can change the HttpServerUtility.ScriptTimeout property value, and as long this token hasn't tripped yet, the new timeout value will be respected.

Currently the token only provides 15 second granularity, which means that if the timeout value is 110 seconds, the token will be tripped sometime between 110 and 125 seconds after request processing begins. The granularity may change in the future.

Even though this property is thread-safe, there are restrictions on its use. For more information, see HttpResponse.ClientDisconnectedToken.

This property is meaningless if WebSockets request processing has started.

.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