BlobRequestOptions.ServerTimeout Property

Definition

Gets or sets the server timeout interval for a single HTTP request.

public TimeSpan? ServerTimeout { get; set; }
member this.ServerTimeout : Nullable<TimeSpan> with get, set
Public Property ServerTimeout As Nullable(Of TimeSpan)

Property Value

Nullable<TimeSpan>

A TimeSpan containing the server timeout interval for each HTTP request.

Implements

Examples


BlobRequestOptions timeoutRequestOptions = new BlobRequestOptions()
{
    // Each REST operation will timeout after 5 seconds.
    ServerTimeout = TimeSpan.FromSeconds(5),

    // Allot 30 seconds for this API call, including retries
    MaximumExecutionTime = TimeSpan.FromSeconds(30)
};

byteCount = blob.DownloadToByteArray(destinationArray, index: 0, accessCondition: null, options: timeoutRequestOptions);

Remarks

The server timeout is the timeout sent to the Azure Storage service for each REST request made. If the API called makes multiple REST calls (UploadFromStream, for example, or if the request retries), this timeout will be applied separately to each request. This value is not tracked or validated on the client, it is only passed to the Storage service.

Applies to