The value for one of the HTTP headers is not in the correct format

Hi,

I just upgraded a working web API from ASP.NET MVC4 to ASP.NET MVC 5. Eventually after modifying configuration files to reflect the new assembly versions, everything seems to be working, except for the development storage.

In my code I do:

var connectionString = _configurationSettingsResolver.GetConfigurationSetting("MgpEventQueueConnectionString");
var storageAccount = CloudStorageAccount.Parse(connectionString);
var queueClient = storageAccount.CreateCloudQueueClient();
_queue = queueClient.GetQueueReference("eventqueue");
_queue.CreateIfNotExists();

The connectionstring is 'UseDevelopmentStorage=true'.

It crashes at the line with CreateIfNotExists, telling me that 'The value for one of the HTTP headers is not in the correct format' .

Debugging this with Fiddler reveals:

HEAD http://127.0.0.1:10001/devstoreaccount1/eventqueue?comp=metadata&timeout=90 HTTP/1.1 User-Agent: WA-Storage/3.0.1 (.NET CLR 4.0.30319.18408; Win32NT 6.1.7601.65536) x-ms-version: 2013-08-15 x-ms-client-request-id: 9e68cc85-dfcb-4e2c-b456-4da7c2371309 x-ms-date: Thu, 12 Dec 2013 10:21:32 GMT Authorization: SharedKey devstoreaccount1:VIM22zQkIJ7/nCm3FI+4j0U7jhGmTNtNwj05lBpMc68= Host: 127.0.0.1:10001 Connection: Keep-Alive

HTTP/1.1 400 The value for one of the HTTP headers is not in the correct format. Transfer-Encoding: chunked Server: Microsoft-HTTPAPI/2.0 x-ms-request-id: e43f43ac-9a2d-47f5-862d-5ba0ae8a605a Date: Thu, 12 Dec 2013 10:21:32 GMT


If I change the connection string so that it points to my acceptance queue, it does work. So it seems that the storage emulator (version 2.2) does not support 'x-ms-version: 2013-08-15'.

Can someone tell me if my understanding is correct and what can be done to make it work locally? 

December 12th, 2013 10:54am

Yes, your understanding is correct. Storage Emulator 2.2 is currently incompatible with Storage Client Library 3.0.0.0. This has been mentioned in Storage Team Blob as well: http://blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors-json-minute-metrics-and-more.aspx (Please read "Storage Emulator Guidance" section towards the end of the post).

Unfortunately there's nothing much you can do other than:

  1. Either roll back storage client library from 3.0.0.0 to 2.x.x.x.
  2. (Kind of lame suggestion) or use cloud storage for development (we actually are doing it as the features introduced in 3.0.0.0 were really important for the product we are building)
  • Marked as answer by LudwigSt Thursday, December 12, 2013 4:31 PM
Free Windows Admin Tool Kit Click here and download it now
December 12th, 2013 1:44pm

Yes, your understanding is correct. Storage Emulator 2.2 is currently incompatible with Storage Client Library 3.0.0.0. This has been mentioned in Storage Team Blob as well: http://blogs.msdn.com/b/windowsazurestorage/archive/2013/11/27/windows-azure-storage-release-introducing-cors-json-minute-metrics-and-more.aspx (Please read "Storage Emulator Guidance" section towards the end of the post).

Unfortunately there's nothing much you can do other than:

  1. Either roll back storage client library from 3.0.0.0 to 2.x.x.x.
  2. (Kind of lame suggestion) or use cloud storage for development (we actually are doing it as the features introduced in 3.0.0.0 were really important for the product we are building)
Thank you. I will also wait for the next storage emulator en use cloud storage for now.
December 12th, 2013 4:32pm

You can now use Windows Azure Storage Emulator 2.2.1 Preview

Updated DLL's for Storage Emulator included in SDK 2.2, which add support for REST version "2013-08-15" to the Storage Emulator.  This allows Storage Emulator to be used by version 3.0 and later of Windows Azure Storage Client Library for .NET.

  • Proposed as answer by Guill4ume Wednesday, March 19, 2014 9:26 AM
Free Windows Admin Tool Kit Click here and download it now
March 19th, 2014 9:25am

Hi Gaurav

I'm not using the storage emulator and I get the same error. Do you know if there could be other reasons for this error and what these reasons would be?

Many thanks


July 3rd, 2015 7:23am

Hi Gaurav

I'm not using the storage emulator and I get the same error. Do you know if there could be other reasons for this error and what these reasons would be?

Many thanks


  • Edited by PixelSquad Friday, July 03, 2015 11:21 AM
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2015 11:21am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics