문제

I am having problem creating an Azure blob container.

When I call CreateIfNotExists() function I get the following exception :

I have search on internet to see if other folks have the same problem or not. I have found two main reasons for this error.

The remote server returned an error: (400) Bad Request.

Stack Trace :

   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext)
   at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.Exists(Boolean primaryOnly, BlobRequestOptions requestOptions, OperationContext operationContext)
   at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext)
   at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(BlobRequestOptions requestOptions, OperationContext operationContext)
   at Customize.AzureSpecific.ProductPhotoStorageService..ctor() in c:\Users\raha\Desktop\Customize\Customize.AzureSpecific\ProductPhotoStorageService.cs:line 28
   at lambda_method(Closure , IArguments )
   at StructureMap.Construction.BuilderCompiler.FuncCompiler`1.<>c__DisplayClass2.<CreateBuilder>b__0(IArguments args) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Construction\BuilderCompiler.cs:line
  1. Valid name for blob container
  2. The port 1000 is already in use.

None of the above is true, because i tried very simple names and also when I open Storage Emulator I can see that the blob is running on port 1000

Do you guys have any ideas that why this is happening ? any help is appreciated.

Update:

Thank you guys yes you were all correct, the problem was the Storage Emulator version. After installing the preview everything is working as it should.

도움이 되었습니까?

해결책

If you are using Azure Storage Client Library 3.0, please make sure you have the latest preview release of the Azure Storage Emulator, which can be found here.

다른 팁

The valid name for blob container should be in lower case letters

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top