locked
Storage container bug on East Asia datacenter RRS feed

  • Question

  • Below c# code will return an exception "One of the request inputs is out of range." from East Asia data center (i.e. container name is "hello")

     CloudBlobContainer container = blobclient.GetContainerReference(containerName);
     container.CreateIfNotExist();

    The codes works on other DCs, such as Southeast Asia, west/east US

    Tuesday, November 26, 2013 7:17 AM

Answers

  • Hi Nemo,

    Thanks for posting!

    According your description, I write a demo to test this issue. But I didn't reproduce your issue.

    Firstly, I create a Blob storage and name it as "willimage".

    Secondly, I used your code in my project, as follow:

    String containName = "hello";            
                CloudStorageAccount storageAccount = CloudStorageAccount.Parse(System.Configuration.ConfigurationManager.ConnectionStrings["StorageConnectionString"].ToString());
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                CloudBlobContainer container = blobClient.GetContainerReference(containName);
                container.CreateIfNotExists();
                CloudBlockBlob blockBlob = container.GetBlockBlobReference("myblob");
                 using (var fileStream = System.IO.File.OpenRead(@"C:\Users\xxxx\Asset\1.jpg"))
                {
                    blockBlob.UploadFromStream(fileStream);
                }
    And then, after I ran this code, I found this container from azure portal.

    About this issue, I suggest you could refer to the same thread (http://stackoverflow.com/questions/2620521/blob-container-creation-exception) and document(http://msdn.microsoft.com/en-us/library/dd135715.aspx ).

    Regards,

    Will

     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 27, 2013 2:04 AM
  • just figure out the problem was caused by naming conversion of storage account. I was aware that there was a naming conversion applied to storage container but not aware of storage account because codes of storage account passed the verification. The problem is caused that I used “Hello” in storage account configuration but the real name of storage account is “hello” (h is a uppercase)

    Thanks,

    Mo

    Wednesday, November 27, 2013 4:05 AM

All replies

  • Hi Nemo,

    Thanks for posting!

    According your description, I write a demo to test this issue. But I didn't reproduce your issue.

    Firstly, I create a Blob storage and name it as "willimage".

    Secondly, I used your code in my project, as follow:

    String containName = "hello";            
                CloudStorageAccount storageAccount = CloudStorageAccount.Parse(System.Configuration.ConfigurationManager.ConnectionStrings["StorageConnectionString"].ToString());
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                CloudBlobContainer container = blobClient.GetContainerReference(containName);
                container.CreateIfNotExists();
                CloudBlockBlob blockBlob = container.GetBlockBlobReference("myblob");
                 using (var fileStream = System.IO.File.OpenRead(@"C:\Users\xxxx\Asset\1.jpg"))
                {
                    blockBlob.UploadFromStream(fileStream);
                }
    And then, after I ran this code, I found this container from azure portal.

    About this issue, I suggest you could refer to the same thread (http://stackoverflow.com/questions/2620521/blob-container-creation-exception) and document(http://msdn.microsoft.com/en-us/library/dd135715.aspx ).

    Regards,

    Will

     


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 27, 2013 2:04 AM
  • just figure out the problem was caused by naming conversion of storage account. I was aware that there was a naming conversion applied to storage container but not aware of storage account because codes of storage account passed the verification. The problem is caused that I used “Hello” in storage account configuration but the real name of storage account is “hello” (h is a uppercase)

    Thanks,

    Mo

    Wednesday, November 27, 2013 4:05 AM