我解決了這個看這個:https://docs.microsoft.com/en-us/aspnet/core/security/data-protection/implementation/key-storage-providers#azure-and-redis
以下是基本步驟我把:
創建一個用於存儲共享密鑰一個Blob存儲賬戶。
下面的代碼添加到您的Startup.cs:
var storageAccount = CloudStorageAccount.Parse("blob storage connection string");
//Create the blob client object.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
//Get a reference to a container to use for the sample code, and create it if it does not exist.
CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
container.CreateIfNotExists();
services.AddDataProtection()
.SetApplicationName("MyApplication")
.PersistKeysToAzureBlobStorage(container, "myblobname");
就是這樣。
來源
2017-04-24 18:19:50
Per
你解決了這個問題嗎?怎麼樣?我有同樣的問題。 – Makla
抱歉,還沒有。我即將重新審視這一點,並將遵循下面列出的建議。 – Per
我添加了一個適用於我的解決方案。 – Per