Share via


ReadWriteTimeout Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets or sets a time-out in milliseconds when writing to or reading from a stream.

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

Syntax

'Declaration
Public Property ReadWriteTimeout As Integer
public int ReadWriteTimeout { get; set; }
public:
property int ReadWriteTimeout {
    int get ();
    void set (int value);
}
member ReadWriteTimeout : int with get, set
function get ReadWriteTimeout () : int
function set ReadWriteTimeout (value : int)

Property Value

Type: System. . :: . .Int32
The number of milliseconds before the writing or reading times out. The default value is 300,000 milliseconds (5 minutes).

Remarks

The ReadWriteTimeout property is used when writing to the stream returned by the GetRequestStream method or reading from the stream returned by the GetResponseStream method.

Specifically, the ReadWriteTimeout property controls the time-out for the Read method, which is used to read the stream returned by the GetResponseStream method, and for the Write method, which is used to write to the stream returned by the GetRequestStream method.

To specify the amount of time to wait for the request to complete, use the Timeout property.

.NET Framework Security

See Also

Reference

HttpWebRequest Class

System.Net Namespace