【问题标题】:I can't access a queue from local Azure Storage Emulator nor from VisualStudio, nor from Azure Storage Explorer我无法从本地 Azure 存储模拟器、VisualStudio 或 Azure 存储资源管理器访问队列
【发布时间】:2014-07-07 13:32:08
【问题描述】:

我需要通过 Azure 队列发送消息,并且需要使用 Windows Azure 模拟器对其进行测试,该模拟器表示运行正常。这些是我经历的步骤:

1- 运行 Windows Azure 存储模拟器(我尝试了 2.0.0 和 3.2.0 版本) 确保模拟器正在运行:

  • 使用 Windows Azure Storage Emulator 2.0.0 时:

    现在“已弃用”的 UI 显示所有三个存储模拟器都正常运行。 (我无法附上显示它的快照,因为我已经为 VisualStudio 2013 升级了 Windows Azure 存储 SDK 工具。

  • 使用 Windows Azure Storage Emulator 3.2.0 时:

    [这里是一个快照,显示它正在正确运行,但我没有添加 imgaes 的声誉:s]

2- 代码:

        string azureStorageConnectionString = "UseDevelopmentStorage=true";
        string queueName = "queuetest";

        CloudStorageAccount storageAccount = CloudStorageAccount.Parse(storageConnectionString);
        CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
        _queue = queueClient.GetQueueReference(queueName);
        _queue.CreateIfNotExists();

3- 每个 WAS Emulator 版本都有两个不同的问题。

-问题A:在线_queue.CreateIfNotExists();得到一个 uri not found 异常(404),因为它找不到队列,uri:127.0.0.1:10001/devstoreaccount1/queuetest

-问题 B:当我升级 WAS 模拟器时,异常消失了(所以升级是问题 A 的解决方案)但 Azure 存储资源管理器无法访问开发者存储帐户并给出以下信息留言:

Windows Azure Developer Storage is not runnign.
The process DSService.exe is not detected

因此,总而言之,我解决了问题 A,但现在 我无法使用 Azure 存储资源管理器访问 DevStorage 帐户。

【问题讨论】:

  • 关于问题 B,它看起来像是特定于 Azure 存储资源管理器。在之前的 Storage Emulator 版本中,该服务的名称为 DSService.exe,在 3.0+ 版本中已更改为 WAStorageEmulator.exe。请检查您是否可以使用 Visual Studio 连接到存储模拟器。 HTH。
  • 这是一个很好的查看队列内容的替代方案(我之前尝试使用,但直到现在都无法使用)。所以,是的,我想我可以继续这样做。我会看看它是否与使用资源管理器相同,如果是,我将使用它:-D 非常感谢您的回答! :D

标签: windows azure storage emulation explorer


【解决方案1】:

一位伙伴给了我一个惊人的解决方案。您需要创建一个名为 DSService 的 VisualStudio 项目,将其放在 C: 中的任何位置并包含以下代码:

namespace DSService
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.ReadLine();
        }
    }
}

现在我可以使用 Azure 存储资源管理器创建、插入消息和访问 DevStorage 帐户队列...:-0

更新:

正如 Gaurav Mantri 所说,你应该使用 VisualStudio 2013 工具来查看 您的 DevStorage 帐户的内容。

【讨论】:

  • 你不想那样做。相反,从 CodePlex 获取 Azure 存储资源管理器的源代码并删除查找 DSService 的代码,编译并使用该版本。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-12-05
  • 1970-01-01
  • 2016-02-22
  • 2020-08-18
  • 1970-01-01
  • 1970-01-01
  • 2022-01-22
相关资源
最近更新 更多