Azure Storage Emulator 400 Bad Request

I unexpectedly get a Bad Request (400) error when using the Azure Storage emulator while trying to CreateIfNotExists. The response to the internal exception says: "The value for one of the HTTP headers is not in the correct format." All tables exist, data is in tables, everything works before updating to my NuGet packages. Looking around, it seems like a common reason is an update to the Azure Storage Client Library (now at 5.0.0), which creates a mismatch. I upgraded the Azure SDK to version 2.6 (since I have VS2012). This brings the storage emulator to 4.0.0.0, but still no luck ... same error. It's partly bad that suddenly updating a package package package makes it all break and completely kills my rather large project. Any ideas?

+7
azure azure-storage-emulator
source share
3 answers

I don't know if this is a problem for anyone else, but this is what I found out ...

  • Storage Emulator 4.1.0.0 is the one that will be used with Azure Storage Client Library 5.0.0
  • Storage Emulator 4.1.0.0 ships with the Azure SDK 2.7.
  • Azure SDK 2.7 will not work with Visual Studio 2012.
  • Azure SDK 2.6 for VS2012 has an emulator 4.0.0.0. I do not know what is compatible with the Client Client library ... I tried 4.3.0.0, 5.0.0.0 and 5.0.2, but no luck

.

My "philosophical" problems with all this ...

  • I do not see a distinguishable connection between the Storage Emulator versions and the versions of the storage client library ... The numbers are not a "match"; There are no errors, dependencies or exceptions that indicate you relationship; I cannot find any search, cross-reference, or table that describes the correct combination of libraries.
  • The theory “just use the latest version” does not work, because in the past they released new versions of the Storage Client library (3.0.0.0) without a working emulator, and now the “latest version” of each separately depends on which SDK is available for your build environment ( VS2012 vs VS2015)

I understand that the storage client library is not technically “dependent” on the emulator ... you don’t need an emulator to use Azure Storage. However, it would be nice if some of these relationships were a little easier for software, as I understand.

+5
source share

In my case, the problem was the Container Name , which has strict name requirements.

Namely:

  • Only lowercase letters, numbers, and dashes are allowed.
  • Must be between 3 and 63 characters

For more information, see Naming and Container, Blobs, and Metadata Links on MSDN.

+10
source share

If I'm not mistaken, you will also need to upgrade the client libraries to 4.x.

You see that each version of the client storage library corresponds to the version of the REST API for the storage, as well as for the storage emulator. If you are using the storage emulator version 4.0, you cannot use the storage client library 5 with this. You will need to use version 4.x.

If you want to use the version 5 repository client library, you have 2 options:

  • Use the latest version of the storage emulator or
  • Make your development against a cloud storage account.
0
source share

All Articles