【发布时间】:2019-11-05 15:55:10
【问题描述】:
升级我的 Azure 存储资源管理器版本后,我的代码停止工作并显示以下消息:
"此版本不支持此请求的 REST 版本 存储模拟器。请将存储模拟器升级到 最新版本。有关详细信息,请参阅以下 URL: http://go.microsoft.com/fwlink/?LinkId=392237"
我的 Azure 存储资源管理器版本是 0.8.16。
上传到 azure 的代码基本上是这样的:
CloudStorageAccount storageAccount = CloudStorageAccount.Parse("UseDevelopmentStorage=true");
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer blobContainer = blobClient.GetContainerReference("mycontainer");
blobContainer.CreateIfNotExistsAsync();
CloudBlockBlob blockBlob = this.blobContainer.GetBlockBlobReference(fileName);
byte[] CoverImageBytes = null;
BinaryReader reader = new BinaryReader(file.OpenReadStream());
CoverImageBytes = reader.ReadBytes((int)file.Length);
await blockBlob.UploadFromByteArrayAsync(CoverImageBytes, 0,(int)file.Length);
在最后一行抛出异常。
更新
1) 你运行的存储模拟器是什么版本的?
V5.1
2) 在您的代码中,您使用的存储客户端库的版本是什么?
8.4.0 here
【问题讨论】:
-
我认为这个错误与 Azure 存储资源管理器没有任何关系。你能告诉我们:1)你运行的存储模拟器是什么版本的? 2) 在您的代码中,您使用的存储客户端库的版本是什么?
-
忘了提及所有这些信息。更新了问题,谢谢@GauravMantri
标签: c# azure azure-storage