Skip to content

Commit 43e999a

Browse files
committed
...
1 parent 78ff196 commit 43e999a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

articles/batch/quick-run-dotnet.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,12 @@ Review the code to understand the steps in the [Azure Batch .NET Quickstart](htt
121121
1. To interact with the storage account, the app uses the Azure Storage Blobs client library for .NET to create a [BlobServiceClient](/dotnet/api/azure.storage.blobs.blobserviceclient).
122122

123123
```csharp
124-
var blobServiceClient = GetBlobServiceClient(StorageAccountName, StorageAccountKey);
125-
```
124+
var sharedKeyCredential = new StorageSharedKeyCredential(storageAccountName, storageAccountKey);
125+
string blobUri = "https://" + storageAccountName + ".blob.core.windows.net";
126+
127+
var blobServiceClient = new BlobServiceClient(new Uri(blobUri), sharedKeyCredential);
128+
return blobServiceClient;
129+
```
126130

127131
1. The app uses the `blobServiceClient` reference to create a container in the storage account and upload data files to the container. The files in storage are defined as Batch [ResourceFile](/dotnet/api/microsoft.azure.batch.resourcefile) objects that Batch can later download to the compute nodes.
128132

0 commit comments

Comments
 (0)