Azure - 创建队列 keep returns "(400) bad request"

Azure - Creating a queue keep returns "(400) bad request"

我正在尝试使用 Azure 简单地创建一个新的存储队列,但它一直崩溃而没有解释,创建表工作得很好,这是相关代码:

        private CloudTable userTable;
        private CloudTable petTable;
        private CloudQueue healingQueue;

        public override bool OnStart()
        {
            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("connectionString"));
            CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
            userTable = tableClient.GetTableReference("users");
            userTable.CreateIfNotExists();
            petTable = tableClient.GetTableReference("pets");
            petTable.CreateIfNotExists();

            // This is where I create the queue: //
            CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
            healingQueue = queueClient.GetQueueReference("healQueue");
            healingQueue.CreateIfNotExists(); // This line makes the code crash.
        }

代码在行 healingQueue.CreateIfNotExists(); 中崩溃,解释为 (400) bad request

表创建得很好,所以我假设存储帐户没有问题,我能做什么?

问题出在以下代码行中:

healingQueue = queueClient.GetQueueReference("healQueue");

基本上,您收到此错误的原因是您为队列选择了无效名称。尝试使用 healqueue(全部小写)。

有关队列命名规则,请参阅此 link:https://msdn.microsoft.com/en-us/library/azure/dd179349.aspx