Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Page.AsyncTimeout Property

This property supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Gets or sets a value indicating the time-out interval used when processing asynchronous tasks.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
public:
property TimeSpan AsyncTimeout {
	TimeSpan get ();
	void set (TimeSpan value);
}
/** @property */
public TimeSpan get_AsyncTimeout ()

/** @property */
public void set_AsyncTimeout (TimeSpan value)

public function get AsyncTimeout () : TimeSpan

public function set AsyncTimeout (value : TimeSpan)

Not applicable.

Property Value

A TimeSpan that contains the allowed time interval for completion of the asynchronous task. The default time interval is 45 seconds.

The asynchronous time-out of the page represents the amount of time that the page will wait to perform asynchronous tasks. In most circumstances, do not set this property in code. Set the page asynchronous time-out interval using the pages element of the Web configuration file or in the @ Page directive. Values set in the page configuration section are overwritten by the page directive.

Define your asynchronous task using the PageAsyncTask class and register a beginning, an ending, and a time-out handler. If the asynchronous task does not complete in the time interval specified, the time-out handler will be invoked.

The following code example demonstrates the use of the AsyncTimeout property with the ExecuteRegisteredAsyncTasks and RegisterAsyncTask methods. Note the use of beginning, ending, and time-out handlers. In the example, an artificial delay is introduced to demonstrate the situation of an asynchronous task exceeding the allotted time for the task as specified in the AsyncTimeout property. In a real-world scenario, an asynchronous task could be used to perform database calls or image generation, for example, and the time-out handler provides graceful degradation if the task is not performed in a specified amount of time. Note that the AsyncTimeout property is set in the page directive.

No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.