Question

I am working on a project in school with Local Azure Storage and the teacher recommended using:

  1. Installing Windows Azure Storage 2.1.0.4
  2. Removing the errornous version Configuration Manager 1.8
  3. Installing the correct and compatible version Configuration Manager 2.0.3

However I am getting a StorageException with 400(Bad Request).

I am using the correct syntax:

public CloudBlobContainer GetCloudBlobContainer()
        {
            CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
            CloudBlobContainer blobContainer = blobClient.GetContainerReference("HiltiHaningePicturesBlobs");
            try
            {
                if (blobContainer.CreateIfNotExists())
                {
                    blobContainer.SetPermissions(new BlobContainerPermissions { PublicAccess = BlobContainerPublicAccessType.Blob });
                }
                return blobContainer;
            }
            catch (StorageException ex)
            {
                if (!(ex.Message == null))
                {
                    throw ex;
                }
                return null;
            }
        }

How can i do this ?

Was it helpful?

Solution

I don't think the error you're getting is because of incorrect WindowsAzure.ConfigurationManager class. More than likely this error is coming because of incorrect blob container name. Please try by changing blob container name to lower case letters. You may find this link useful for naming convention: http://msdn.microsoft.com/en-us/library/windowsazure/dd135715.aspx.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top