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?