Download the Essential Cloud Buyer’s Guide to learn important factors to consider before selecting a provider as well as buying criteria to help you make the best decision for your infrastructure needs, brought to you in partnership with Internap.
I received a rather...vague...error when trying out a bit of .NET code
to connect to a Windows Azure Blob Storage account, and create a new
container in which to store some blobs.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container =
container.CreateIfNotExist(); // This error'd
A StorageClientException was thrown saying "One of the request inputs is
out of range.". An inner WebException showed that "The remote server
returned an error: (400) Bad Request."
I'd assumed (incorrectly) that a container name could be pretty much any string. But that's not the case. As per this MSDN reference
, a container name must:
- be in lowercase (this was the cause in my case)
- start with a letter or a number and only contain letters, numbers and hyphens (multiple consecutive hyphens are not allowed)
- be between 3 and 63 characters long
The "Naming and Referencing Containers, Blobs and Metadata
" reference is worth a bookmark.
The Cloud Zone is brought to you in partnership with Internap. Read Bare-Metal Cloud 101 to learn about bare-metal cloud and how it has emerged as a way to complement virtualized services.