1
votes

I created a new Storage account in the Azure portal and choosed an existing Resource Group. It did not create a classic storage account but some kind of resource group-ish storage account that doesn´t have all the options a classic storage account has.

As an example, I could create the "files" folder through code, but I can´t use the code: "blockBlob.UploadFromStream(fileStream);", it gives me error 400 bad request. The same code works when I upload to a classic storage account.

What kind of storage account is seen in my image? Which is more correct, to create a classic storage account (blue icon in image) or the one I did (green/white/grey icon in image)?

My storage account from Azure portal

3

3 Answers

0
votes

First, I would suggest you have a look at David's reply in this thread to know the difference between new Azure storage account and classic Azure storage account.

it gives me error 400 bad request.

There are a lot of issues to caused 400 error. I would suggest your check your code to find out detailed issues. Please test use your code to create container (container name must meet the limitations) to see whether it will work. It is better if you could provide key code.

0
votes

You created an Azure Resource Manager storage account of type Premium storage in region "North Europe" within your given resource group.

There is not really a right or wrong. As almost always it depends on your use-case.

I want to suggest these docs and samples for getting started with code addressing block blobs and Azure storage in general. Run and explore this code against the storage emulator and/or live storage accounts (classic/ARM standard/ARM premium). May be this helps finding a bug or a misconfiguration in your project.

0
votes

The issue here has nothing to do with Classic vs Resource Manager. It's related to the fact that the storage account is of type "Premium."

Premium storage accounts are exclusively used for Azure disks (attached durable storage), which are Page Blobs.

Premium storage doesn't support generic blobs/tables/queues. For that, you'd need a non-premium storage account.