The REST version of this request is not supported by this version of the storage emulator.

After updating my version of Azure Storage Explorer, my code stops working with the following message:

"The REST version of this request is not supported by this version of Storage Emulator. Update the storage emulator to the Latest version. For more information, see the following URL: http://go.microsoft.com/fwlink/?LinkId=392237 "

My version of Azure Storage Explorer is 0.8.16.

Basically, the code for loading in azure tends to look like this:

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); 

An exception is selected in the last row.

UPDATE

1) What version of storage emulator are you using?

V5.1

2) In your code, what version of the client store library are you using?

8.4.0 here

+5
source share
1 answer

The reason you get this error is because Client Client Library 8.4 is set to REST API version 2017-04-17 , where REST API version 2016-05-31 is set as the storage emulator version 5.1.

You can do one of two things:

  • Install the latest version of the storage emulator (5.2 at this time).
  • Download the storage client library to version 8.3, which supports the REST API version 2016-05-31 .

My recommendation would be to upgrade to C # 1, i.e. use the latest version of the storage emulator.

+3
source

Source: https://habr.com/ru/post/1271958/


All Articles