Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets or sets the time-out for the default network executor.
Note
To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as cancel, you call the get_cancel or set_cancel methods.
var dTimeout = Sys.Net.WebRequestManager.get_defaultTimeout ();
Sys.Net.WebRequestManager.set_defaultTimeout(value);
Parameters
Parameter |
Description |
---|---|
value |
The time in milliseconds that the default executor should wait before timing out a Web request. This value must be 0 or a positive integer. |
Return Value
An integer value that indicates the current time-out for the default executor.
Exceptions
Exception type |
Condition |
---|---|
An invalid parameter was passed. |
Remarks
Use the defaultTimeout property to get or set the time in milliseconds that the default executor should wait before timing out a Web request.
By setting a time-out value that is not zero, you can make sure that a pending Web request returns the control back to the caller in a timely manner.
Example
The following example shows how to set and get the default executor time-out. This code is part of a complete example found in the WebRequestManager class overview.
See Also
Reference
Sys.Net.WebRequestManager Class
Sys.Net.WebRequestExecutor Class