SALES: 1-800-867-1380
1 out of 2 rated this helpful - Rate this topic

BlobRequestOptions.Timeout Property

Updated: April 24, 2013

[This topic is part of the Windows Azure Storage Client Library 1.7, which has been deprecated. The current recommended version is Storage Client Library 3.0.]

Gets or sets the service timeout for the request.

Namespace: Microsoft.WindowsAzure.StorageClient
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)
'Usage

public:
property Nullable<TimeSpan> Timeout {
	Nullable<TimeSpan> get ();
	void set (Nullable<TimeSpan> value);
}

Property Value

Type: System.Nullable

The service timeout interval for the request.

The following code uploads a file to a blob using a timeout of 20 seconds for the operation.


var account = CloudStorageAccount.Parse
    ("AccountName=myaccount;AccountKey=mykey;DefaultEndpointsProtocol=http");
var blobClient = account.CreateCloudBlobClient();
var container = blobClient.GetContainerReference("testcontainer");
var blob = container.GetBlobReference("testblob");
BlobRequestOptions blobRequestOptions = new BlobRequestOptions();
blobRequestOptions.Timeout = TimeSpan.FromSeconds(20.0);
blob.UploadFile("myfile.txt", blobRequestOptions);

Setting the Timeout property for an individual request overrides the setting of the Timeout property for that request.

The default timeout interval for a request made via the storage client library is 90 seconds, but the blob service enforces a shorter timeout in most cases. See Setting Timeouts for Blob Service Operations.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows Vista, Windows 7 and Windows Server 2008

Target Platforms

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.