Il contenuto non è disponibile nella lingua di destinazione, ma solo in inglese.

CloudBlobClient Constructor (Uri, StorageCredentials)

Updated: April 24, 2011

[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.]

Initializes a new instance of the CloudBlobClient class using the specified Blob service endpoint and account credentials.

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

Dim baseUri As Uri
Dim credentials As StorageCredentials

Dim instance As New CloudBlobClient(baseUri, credentials)

public CloudBlobClient (
	Uri baseUri,
	StorageCredentials credentials



Type: System.Uri

The Blob service endpoint to use to create the client.


Type: Microsoft.WindowsAzure.StorageCredentials

The account credentials.

The following code example creates a credentialed service client and uploads text content to a blob.

static void UploadBlobFromFile(Uri blobEndpoint, string accountName, string accountKey)
    //Create service client for credentialed access to the Blob service.
    CloudBlobClient blobClient =
        new CloudBlobClient(blobEndpoint, new StorageCredentialsAccountAndKey(accountName, accountKey));

    //Get a reference to a container, which may or may not exist.
    CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
    //Create a new container, if it does not exist

    //Get a reference to a blob, which may or may not exist.
    CloudBlob blob = container.GetBlobReference("myfile.txt");

    //Upload content to the blob, which will create the blob if it does not already exist.

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012



CloudBlobClient Class
CloudBlobClient Members
Microsoft.WindowsAzure.StorageClient Namespace