Reputation: 113
When I create a C# Window Form Application and i put in main the following istructions i receive the "400 error: Bad Request"
CloudStorageAccount storageAccount = CloudStorageAccount.Parse("DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;TableEndpoint=http://127.0.0.1:10002/devstoreaccount1;QueueEndpoint=http://127.0.0.1:10001/devstoreaccount1");
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference("test");
container.CreateIfNotExists();
Upvotes: 1
Views: 1279
Reputation: 172
If you are using Storage Client library version 6.0.0, you can upgrade storage emulator to version 4.2 or above. It is available as part of Azure SDK 2.7.1 for .NET.
https://azure.microsoft.com/en-us/blog/announcing-the-azure-sdk-2-7-1-for-net/
Upvotes: 3
Reputation: 136146
You will get this error if you're using Storage Client library version 6.0.0 with Storage Emulator as current version of Storage Emulator is not compatible with the latest version of Storage Client library.
You could do 2 things:
Upvotes: 1