"(400) Bad Request" when trying to connect with Azure Storage

3

I had a problem when trying to communicate with an Azure Storage storage service, the communication was made from a Windows Azure website to a Storage container. When the communication is made from a local website works perfectly. I tried updating the Windows Storage Client libraries, but I do not know what it could be.

    
asked by Jeisson 17.12.2015 в 05:14
source

2 answers

3

The BadRequest problems with Storage come hand in hand with the version of the Nuget package that you are using in your project and the Public API version of the Storage.

It is generally recommended to update to the latest version of WindowsAzure.Storage , 6.2.0 currently .

The reason is that when you test it locally, you probably use the Storage Emulator, whose interface is usually of "older" versions than those that are online (unless you keep your Azure SDK up to date), your SDK may work well with that emulator but at the moment of passing it to production it will no longer work due to the difference in version of the APIs.

The Storage Emulator is usually updated with the Azure SDK .

I hope you have helped!

    
answered by 17.12.2015 в 17:39
2

I insist that it is very necessary to look at the C # code and the web.config / app.config.

In development: Storage Emulator

The problem you pose is recurrent because in a development environment you must be connecting to the Azure Storage Emulator , which runs locally, in a webrole the parameters are preconfigured to access the Emulator and therefore it is possible to that always works for you, but when publishing in the cloud you need to configure the correct access to the storage account, and that's where you should have the error.

    
answered by 17.12.2015 в 18:15