在Microsoft.WindowsAzure.Storage.dll中发生了一个'Microsoft.WindowsAzure.Storage.StorageException'类型的第一次机会异常。

5

我正在尝试使用队列,但是出现了以下异常:

A first chance exception of type 'Microsoft.WindowsAzure.Storage.StorageException' occurred in Microsoft.WindowsAzure.Storage.dll

Additional information: The remote server returned an error: (400) Bad Request.

我也查看了这个问题,但是没有找到我的答案:Exception of type 'Microsoft.WindowsAzure.StorageClient.StorageClientException' was thrown 以下是代码:
    storageAccount = CloudStorageAccount.Parse(
    CloudConfigurationManager.GetSetting("StorageConnectionString"));
    queueClient = storageAccount.CreateCloudQueueClient();
    rawMessageQueue = queueClient.GetQueueReference("rawMessageQueue");

    private CloudQueue rawMessageQueue;
    var QueueExists = rawMessageQueue.Exists();

异常的调用堆栈是什么? - Matt
8
您的队列名称无效。它应全部为小写字母。请查看此链接以了解队列命名规则:http://msdn.microsoft.com/zh-cn/library/azure/dd179349.aspx。 - Gaurav Mantri
你可以通过查看e.RequestInformation.HttpStatusMessage来确定根本原因。 - yonisha
1个回答

1
只需更新以下dll文件:
  1. Microsoft.WindowsAzure.Storage.dll

  2. Microsoft.WindowsAzure.Configuration.dll

enter image description here

然后重新构建。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接