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)

public int ReadWriteTimeout { get; set; }

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).

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.

Show: