3
votes

I'm setting up Azure Storage Emulator but when I attempt to put a blob in to a container, I get the above exception.

I'm working with Windows Azure Storage Emulator 4.4.0.0.

I get the same error in my code (versions 4.3.0.0 and 7.0.0.0 of Microsoft.WindowsAzure.Storage), as well as latest version of Microsoft Azure Storage Explorer (0.7.20160509.0). In code, the failing method is CloudBlockBlob.UploadFromStream(myStream source).

I've hooked up Fiddler proxy and compared the request to the Azure Blob REST API, and it looks ok to me.

Request:

PUT     http://127.0.0.1:10000/devstoreaccount1/public/broker/broker_placeholderLogo.png HTTP/1.1
User-Agent: Azure-Storage/7.0.0 (.NET CLR 4.0.30319.42000; Win32NT 10.0.10586.0)
x-ms-version: 2015-07-08
Content-MD5: 1/VCBZRjnuUQPBtMviZfzw==
x-ms-blob-type: BlockBlob
x-ms-client-request-id: fec3ada1-653b-46ec-81f0-a1602baab494
x-ms-date: Wed, 25 May 2016 14:01:17 GMT
Authorization: SharedKey devstoreaccount1:60ts48q7J714f74GWTA3sbICqGvxqg2NXPWjZQH/IXA=
Host: 127.0.0.1:10000
Content-Length: 10748

Response:

HTTP/1.1 400 One of the request inputs is not valid.
Content-Length: 220
Content-Type: application/xml
Server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 8882fa90-80d0-4043-a997-836f645bc349
x-ms-version: 2015-07-08
Date: Wed, 25 May 2016 14:01:17 GMT

<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidInput</Code><Message>One of the request inputs is not valid.
RequestId:8882fa90-80d0-4043-a997-836f645bc349
Time:2016-05-25T14:01:17.5245914Z</Message></Error>

The containers are being created fine, so I don't think it's a problem with authorisation. I'm running out of ideas on what might be causing this issue.

UPDATE: I've tried removing the MD5 validation, but it made no difference.

3
From where did you download version 4.4.0.0 of Storage Emulator? I downloaded the latest version just now and it says version 4.3.Gaurav Mantri

3 Answers

3
votes

Try to solve it by installing version 4.3.0.0. Had the same problem today and that worked perfectly

Currently, it is still possible to download version 4.3.0.0 by going to https://azure.microsoft.com/en-us/downloads/ (Section: Command-line tools) and downloading the standalone package of the Azure Storage Emulator.

2
votes

We've investigated the issue and have determined it affects a subset of customers. We are currently testing a hot fix to address the issue; until then, please stay on 4.3. We apologize for the inconvenience.

[UPDATE] An updated version of 4.4 is now available which should address this issue.

0
votes

I had the same issue on iOS. The problem was in request's default cache policy, it silently added If-None-Match header. Adding [request setCachePolicy: NSURLRequestReloadIgnoringLocalCacheData]; fixed the problem for me.