【问题标题】:Azure sample application is not working when trying to run in emulator尝试在模拟器中运行时 Azure 示例应用程序不工作
【发布时间】:2012-11-12 10:29:59
【问题描述】:

我正在运行一个 Azure 存储程序。

https://www.windowsazure.com/en-us/develop/nodejs/tutorials/web-site-with-storage/

当我运行应用程序时出现错误:

    throw err;
          ^

错误:getaddrinfo ENOENT 在 errnoException (dns.js:31:11) 在 Object.onanswer [as oncomplete] (dns.js:140:16)

我已编辑程序以使用具有凭据的模拟器: , accountName = 'azure.ServiceClient.DEVSTORE_STORAGE_ACCOUNT' , accountKey = 'azure.ServiceClient.DEVSTORE_STORAGE_ACCESS_KEY';

/**

你能告诉我是什么问题以及如何解决这个问题

@smarx 帮助我确定这是帐户设置的问题。

请告诉我如何解决这个问题

【问题讨论】:

  • 在 Azure 中运行它会发生什么?

标签: azure azure-storage azure-table-storage


【解决方案1】:

在针对本地模拟器使用存储时,我遇到了类似的问题。不确定这是否有帮助,但是当我指定本地表服务端点时它起作用了。代码看起来像

var client = azure.createTableService(azure.ServiceClient.DEVSTORE_STORAGE_ACCOUNT, azure.ServiceClient.DEVSTORE_STORAGE_ACCESS_KEY, azure.ServiceClient.DEVSTORE_TABLE_HOST);

【讨论】:

  • 我仍然得到相同的错误:我添加了:azure.createTableService(accountName, accountKey,accounthost) 和,accounthost = 'azure.ServiceClient.DEVSTORE_TABLE_HOST';在 var 声明列表中
  • 在指定帐户、密钥和主机时,您的代码是否类似于 var key = 'azure.ServiceClient.DEVSTORE_STORAGE_ACCOUNT'?或者 var key = azure.ServiceClient.DEVSTORE_STORAGE_ACCOUNT ?你不应该用单引号引用它们。
猜你喜欢
  • 2012-10-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-26
  • 1970-01-01
相关资源
最近更新 更多