Skip to content

Commit 14b2d85

Browse files
committed
Fixing an instance of connection string
1 parent 77179e5 commit 14b2d85

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

articles/storage/blobs/client-side-encryption.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: normesta
77

88
ms.service: azure-blob-storage
99
ms.topic: article
10-
ms.date: 12/12/2022
10+
ms.date: 08/07/2024
1111
ms.author: normesta
1212
ms.reviewer: ozgun
1313
ms.devlang: csharp
@@ -154,7 +154,8 @@ BlobClientOptions options = new SpecializedBlobClientOptions() { ClientSideEncry
154154
// and from container clients to blob clients.
155155
// Attempting to construct a BlockBlobClient, PageBlobClient, or AppendBlobClient from a BlobContainerClient
156156
// with client-side encryption options present will throw, as this functionality is only supported with BlobClient.
157-
BlobClient blob = new BlobServiceClient(connectionString, options).GetBlobContainerClient("my-container").GetBlobClient("myBlob");
157+
BlobClient blob = new BlobServiceClient
158+
(new Uri($"https://{accountName}.blob.core.windows.net"), new DefaultAzureCredential(), options).GetBlobContainerClient("my-container").GetBlobClient("myBlob");
158159

159160
// Upload the encrypted contents to the blob.
160161
blob.Upload(stream);

0 commit comments

Comments
 (0)