Have you been playing with Azure storage, trying to create Blobs, Tables or Queue’s ??

Have you been getting any of the following errors:

[Azure Blob Storage]
Microsoft.WindowsAzure.StorageClient.CloudBlobClient ccb = account.CreateCloudBlobClient();
CloudBlob cb = ccb.GetBlobReference(“myblob2871618”);

FAILS with: StorageClientExecption
“One of the request inputs is out of range.”
“The remote server returned an error: (400) Bad Request.”
Error code: BadRequest

[Azure Table Storage]
Microsoft.WindowsAzure.StorageClient.CloudTableClient cct = account.CreateCloudTableClient();
“Exception of type ‘Microsoft.WindowsAzure.StorageClient.StorageClientException’ was thrown.”
StatusCode: System.Net.HttpStatusCode.BadRequest

[Azure Queue Storage]
Microsoft.WindowsAzure.StorageClient.CloudQueueClient ccq = account.CreateCloudQueueClient();
CloudQueue cq = ccq.GetQueueReference(“myqueue”);

“One of the request inputs is out of range.”
“The remote server returned an error: (400) Bad Request.”

Well, the solution is as I found a little simpler than imagined.

When I created my Storage account online I created it with my standard Camel Case name. PaulStorage. On my connection string I had the name of the storage and my key.

So it looked like:


When you try and open the connection for my Cloud Storage Account, and pass this in, it will work fine, when you try and do anything like the statements above you get the errors listed.

I knew that for other things like Queue’s in Azure you need to specify them in lowercase or they don’t work. I asked around and found that Azure was very fussy when it came to case. Even though I had specified the Storage account as Camel case I needed to pass it in as lower case to have it work:


Once I made this remarkable at the time, discovery.. Everything started working.

One thing to note is that development storage is a lot more forgiving and you don’t have to worry about any of this.

Development storages connection string is as simple as it gets: