升级我的Azure Storage Explorer版本后,我的代码停止使用以下消息:
"此版本的存储模拟器不支持此请求的REST版本.请将存储模拟器升级到最新版本.有关详细信息,请参阅以下URL:http: //go.microsoft.com/fwlink/? LinkId = 392237 "
我的Azure Storage Explorer版本是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);
Run Code Online (Sandbox Code Playgroud)
异常抛出最后一行.
UPDATE
1)您正在运行的存储模拟器的版本是什么?
V5.1
2)在您的代码中,您正在使用的Storage Client库的版本是什么?
这里是8.4.0