我需要通过Azure队列发送消息,我需要使用Windows Azure模拟器进行测试,该模拟器表示正确运行。这些是我经历的步骤:
1-运行Windows Azure存储模拟器(我尝试了2.0.0和3.2.0版本)确保模拟器正在运行:
2-代码:
string azureStorageConnectionString = "UseDevelopmentStorage=true";
string queueName = "queuetest";
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(storageConnectionString);
CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
_queue = queueClient.GetQueueReference(queueName);
_queue.CreateIfNotExists();
3- I每个WAS Emulator版本都有两个不同的问题。
-Problem A:在行_queue.CreateIfNotExists();得到一个未找到uri的异常(404),因为它无法找到队列,使用uri:127.0.0.1:10001 / devstoreaccount1 /queuetest
-Problem B:当我升级WAS仿真器时,异常消失了(因此升级是问题A的解决方案)但Azure Storage Explorer不会访问开发人员存储帐户并提供以下消息:
Windows Azure Developer Storage is not runnign.
The process DSService.exe is not detected
总而言之,我修复了问题A,但现在我无法使用Azure存储资源管理器访问DevStorage帐户。
配偶给了我一个惊人的解决方案。您需要创建一个名为DSService的VisualStudio项目,将其放在C:中的任何位置,并包含以下代码:
namespace DSService
{
class Program
{
static void Main(string[] args)
{
Console.ReadLine();
}
}
}
现在,我可以使用Azure存储资源管理器...创建,插入消息和访问DevStorage帐户队列:-0
更新:
正如Gaurav Mantri所说,您应该使用VisualStudio 2013工具查看DevStorage帐户的内容。