为什么我的Azure存储队列域帐户丢失? [英] Why is the queue domain on my azure storage account missing?

查看:260
本文介绍了为什么我的Azure存储队列域帐户丢失?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功地创建在Azure存储帐户以下设置:




  • 部署:资源管理器

  • 类型:通用(标准)

  • 复制:ZRS



在该Azure的门户,我可以看到一个斑点的服务,如果我点击它,我可以将BLOB域下创建的blob容器:的的https:// [帐户名] .blob.core.windows.net /



到目前为止好



当我尝试创建一个C#应用程序我得到的错误,它找不到[帐户名]域使用的Azure SDK的队列。队列 .core.windows.net。



我一直在下面创建一个存储账户,并得到一个简单的队列工作的微软教程,我看不到任何其他步骤在创建此排队域。 。关于Azure的门户网站本身,我无法找到任何其他选项来创建一个队列或队列服务



我使用的参考代码:

  VAR storageAccount = CloudStorageAccount.Parse(ConfigurationManager.ConnectionStrings [AzureWebJobsStorage]的ToString()); 

VAR blobClient = storageAccount.CreateCloudBlobClient();
VAR blobContainer = blobClient.GetContainerReference(出口);
blobContainer.CreateIfNotExists();

VAR queueClient = storageAccount.CreateCloudQueueClient();
VAR exportQueue = queueClient.GetQueueReference(出口请求);
exportQueue.CreateIfNotExists();



创建BLOB容器调用成功,我可以看到的Azure门户的新容器。
调用创建队列失败,出现以下异常:

 类型的异常Microsoft.WindowsAzure.Storage .StorageException发生在Microsoft.WindowsAzure.Storage.dll但在用户代码

附加信息没有处理:远程名称无法解析:[帐户名] .queue.core.windows.net '


解决方案

你得到这个错误的原因是因为 ZRS 存储账户仅支持Blob存储(只有太块斑点)。从这个博客帖子: https://开头的博客.msdn.microsoft.com / windowsazurestorage / 2014/08/01 /引入区域冗余存储/ (见使用ZRS帐户




由于ZRS帐户不支持网页BLOB,文件,表或队列,任何
试图创建或操作上ZRS这些对象存储帐户
将失败。




如果你想使用队列,则需要选择其他冗余级别。这时下列类型的存储账户的冗余级别的支持队列 - LRS,GRS,并RAGRS。目前,它是不可能改变ZRS帐户到LRS / GRS / RAGRS帐户。因此,你需要创建一个新的存储帐户。


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'

解决方案

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.

这篇关于为什么我的Azure存储队列域帐户丢失?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆