Share via


HttpWebRequest.Timeout Property

Gets or sets the timeout value in milliseconds for the GetResponse and GetRequestStream methods.

Namespace: System.Net
Assembly: System (in system.dll)

Syntax

public override int Timeout { get; set; }

Property Value

The number of milliseconds to wait before the request times out. The default is 100,000 milliseconds (100 seconds). Valid values: a nonnegative integer or Timeout.Infinite.

Remarks

Overrides the WebRequest.Timeout property.

Exceptions

Exception type Condition
ArgumentOutOfRangeException The Timeout is not a valid value.

Version Information

Available in the .NET Micro Framework versions 4.0 and 4.1.

See Also

Reference

HttpWebRequest Class
HttpWebRequest Members
System.Net Namespace