Getting error 400 bad request when accessing Azure blob storage - all latest components

7k views Asked by At

I am running in to the "400 bad request" error that many have posted about when accessing Azure blob storage. Most of the fixes relate to updating versions of the Azure SDK and of the Storage Emulator from late '13 or '14, but there have been several subsequent releases since then.

        CloudStorageAccount storageAccount = CloudStorageAccount.Parse("blabla");
        CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
        CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
        CloudBlockBlob blockBlob = container.GetBlockBlobReference(id);
        string x = blockBlob.DownloadText(); // <-- Problem happens here

I was running ok and then something changed to cause this error to start.

  • It does not appear to be a naming issue - my storage container is all lowercase and 12 characters
  • It's not the emulator - I'm not even using it

Running Visual Studio 2013 Community Edition, Azure SDK 2.6, and version 4.3.0 of the NuGet package for the Windows Azure Storage library. (I've tried going to the most recent 3.x release but same problem.)

In addition, to be sure I was clean, I removed all versions of the Azure SDK and of the local tools and reinstalled the Azure SDK 2.6.

1

There are 1 answers

2
Perry Skountrianos - MSFT On BEST ANSWER

Please take a look at the following articles for monitoring, diagnosing, and troubleshooting Microsoft Azure Storage.