fix bug by updating parameter in method PersistKeysToAzureBlobStorage()

pull/26360/head
zedy 2022-07-08 11:31:49 +08:00
parent c31fa0f05e
commit c2b75f497d
1 changed files with 4 additions and 1 deletions

View File

@ -46,13 +46,16 @@ If the web app is running as an Azure service, connection string can be used to
```csharp
string connectionString = "<connection_string>";
string containerName = "my-key-container";
string blobName = "keys.xml"
BlobContainerClient container = new BlobContainerClient(connectionString, containerName);
// optional - provision the container automatically
await container.CreateIfNotExistsAsync();
BlobClient blobClient = container.GetBlobClient(blobName);
services.AddDataProtection()
.PersistKeysToAzureBlobStorage(container, "keys.xml");
.PersistKeysToAzureBlobStorage(blobClient);
```
> [!NOTE]