Exportieren (0) Drucken
Alle erweitern
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

BlobRequestOptions.Timeout Property

Updated: April 24, 2013

[This topic is part of the Microsoft Azure Storage Client Library 1.7, which has been deprecated. See Storage Client Library for the latest version.]

Gets or sets the service timeout for the request.

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

Dim instance As BlobRequestOptions
Dim value As Nullable(Of TimeSpan)

value = instance.Timeout

instance.Timeout = value

public Nullable<TimeSpan> Timeout { get; set; }

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
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, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012


© 2015 Microsoft