6
votes

I have successfully create a storage account on Azure with the following settings:

  • Deployment: Resource manager
  • Type: General Purpose (Standard)
  • Replication: ZRS

On the Azure portal I can see a "Blobs" service and if I click on it, I can create blob containers under the blob domain: https://[account_name].blob.core.windows.net/

So far so good.

When I try to create a queue using the Azure SDK in a C# app I get the error that it can't find the domain for [account_name].queue.core.windows.net .

I've been following the Microsoft tutorials for creating a storage account and getting a simple queue working and I can't see any other steps the create this "queue" domain. On the Azure portal itself, I can't find any other options to create a Queue or Queue service.

The code I'm using for reference:

var storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings["AzureWebJobsStorage"].ToString());

var blobClient = storageAccount.CreateCloudBlobClient();
var blobContainer = blobClient.GetContainerReference("export");
blobContainer.CreateIfNotExists();

var queueClient = storageAccount.CreateCloudQueueClient();
var exportQueue = queueClient.GetQueueReference("export-requests");
exportQueue.CreateIfNotExists();

The call to create the blob container succeeds and I can see the new container in the Azure Portal. The call to create the queue fails with the following exception:

An exception of type 'Microsoft.WindowsAzure.Storage.StorageException' occurred in Microsoft.WindowsAzure.Storage.dll but was not handled in user code

Additional information: The remote name could not be resolved: '[account_name].queue.core.windows.net'
1
Please edit your question to show the code you used, for creating your queue (and the resulting error). Also: What's visualized on the portal has nothing to do with availability of your Storage account. The fact that you can manipulate blobs means your storage account exists.David Makogon
Thanks for the suggestion David. I added the code and exception.Paulo Pinto

1 Answers

13
votes

The reason you're getting this error is because ZRS storage accounts only support Blob Storage (and that too Block Blobs only). From this blog post: https://blogs.msdn.microsoft.com/windowsazurestorage/2014/08/01/introducing-zone-redundant-storage/ (see section Using a ZRS account)

Since ZRS accounts do not support page blob, file, table or queue, any attempt to create or manipulate those objects on a ZRS storage account will fail.

If you want to use queues, you need to choose another redundancy level. At this time following types of storage account redundancy levels support queues - LRS, GRS, and RAGRS. Currently it is not possible to change a ZRS account into LRS/GRS/RAGRS account. Thus you would need to create a new storage account.