我只是尝试将我的Blob存储与.net SDK连接到MVC应用程序,这是我的代码;
public static CloudBlobClient CreateClient(UnitOfWork uow)
{
CloudStorageList credentials;
CloudBlobClient client;
credentials = uow.RepositoryFor<CloudStorageList>().GetAll(filter: xx => !xx.IsDeleted).FirstOrDefault();
var storageCredentials = new StorageCredentials(credentials.Name, credentials.PrimaryAccessKey);
var storage =
new CloudStorageAccount(storageCredentials,true);
client = storage.CreateCloudBlobClient();
return client;
}
但是当我到达线路时我正面临错误;
var storage =
new CloudStorageAccount(storageCredentials,true);
我刚才提到了主题中的错误,即storageUI中的primary和secondear位置URI必须指向同一个资源。
任何帮助都是有利的。
问候,
答案 0 :(得分:0)
var storageCredential = new StorageCredentials(*,**);
**是keyValue:图像中的vieuw