Blob container creation exception ...
Posted
by Egon
on Stack Overflow
See other posts from Stack Overflow
or by Egon
Published on 2010-04-12T07:38:45Z
Indexed on
2010/04/12
7:43 UTC
Read the original article
Hit count: 908
I get an exception every time I try to create a container for the blob
using the following code
blobStorageType = storageAccInfo.CreateCloudBlobClient();
ContBlob = blobStorageType.GetContainerReference(containerName);
//everything fine till here ; next line creates an exception
ContBlob.CreateIfNotExist();
Microsoft.WindowsAzure.StorageClient.StorageClientException was unhandled
Message="One of the request inputs is out of range."
Source="Microsoft.WindowsAzure.StorageClient"
StackTrace:
at Microsoft.WindowsAzure.StorageClient.Tasks.Task1.get_Result()
at Microsoft.WindowsAzure.StorageClient.Tasks.Task
1.ExecuteAndWait()
at Microsoft.WindowsAzure.StorageClient.TaskImplHelper.ExecuteImplWithRetry[T](Func2 impl, RetryPolicy policy)
at Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.CreateIfNotExist(BlobRequestOptions options)
at Microsoft.WindowsAzure.StorageClient.CloudBlobContainer.CreateIfNotExist()
at WebRole1.BlobFun..ctor() in C:\Users\cloud\Documents\Visual Studio 2008\Projects\CloudBlob\WebRole1\BlobFun.cs:line 58
at WebRole1.BlobFun.calling1() in C:\Users\cloud\Documents\Visual Studio 2008\Projects\CloudBlob\WebRole1\BlobFun.cs:line 29
at AzureBlobTester.Program.Main(String[] args) in C:\Users\cloud\Documents\Visual Studio 2008\Projects\CloudBlob\AzureBlobTester\Program.cs:line 19
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Net.WebException
Message="The remote server returned an error: (400) Bad Request."
Source="System"
StackTrace:
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Microsoft.WindowsAzure.StorageClient.EventHelper.ProcessWebResponse(WebRequest req, IAsyncResult asyncResult, EventHandler
1 handler, Object sender)
InnerException:
Do you guys knw what is it that I am doing wrong ?
© Stack Overflow or respective owner