Why is there no queue domain on my azure account?

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

  • Deployment: Resource Manager
  • Type: General (Standard)
  • Replication: ZRS

I can see the Blobs service on the Azure portal, and if I click on it, I can create blob containers in 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 # application, I get an error that it cannot find the domain for [account_name]. queue .core.windows.net.

I follow Microsoft's tutorials on creating a vault account and working with a simple queue, and I don't see any other steps to create this queue domain. In the Azure portal, I cannot find any other options for creating a queue or queue service.

The code I use 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 a blob container is made, and I see a new container on the Azure Portal. The queue creation call 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' 
+6
source share
1 answer

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

Since ZRS accounts do not support a blob page, a file, table, or queue will not succeed in attempting to create or manipulate these objects on the ZRS storage account.

If you want to use queues, you need to choose a different reservation level. At this time, the following types of storage redundancy levels support support queues β€” LRS, GRS, and RAGRS. It is currently not possible to change your ZRS account to LRS / GRS / RAGRS. Thus, you will need to create a new storage account.

+13
source

All Articles