【问题标题】:Microsoft.WindowsAzure.Storage: No valid combination of account information foundMicrosoft.WindowsAzure.Storage:找不到有效的帐户信息组合
【发布时间】:2018-01-13 00:15:46
【问题描述】:

我正在使用 Azure Functions Preview 并想添加一个 QueueTrigerFunction。

函数定义如下:

[FunctionName("QueueTrigger")]        
public static void Run([QueueTrigger("testqueue1", Connection = "AzureWebJobsStorage")]string myQueueItem, TraceWriter log)
{
    log.Info($"C# Queue trigger function processed: {myQueueItem}");
}

使用 local.settings.json:

{
    "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=test1storage;AccountKey=XXXXX==;EndpointSuffix=core.windows.net/;",
    "AzureWebJobsDashboard": ""
  }
}

当我启动 VS 调试器时,我收到以下错误消息:

[8/5/2017 1:07:56 AM] Microsoft.WindowsAzure.Storage:没有有效的组合 找到帐户信息。

我错过了什么?我需要检查 Azure 中的一些其他设置以确保正确配置此方案吗?

【问题讨论】:

    标签: azure azure-functions azure-storage-queues azure-functions-runtime


    【解决方案1】:

    我遇到了类似的问题,连接失败。

    我在 unix 系统上本地运行该函数,而不是使用本地设置,我使用了直接的环境变量。

    原来在声明变量时应该用引号引起来:

    export AzureWebJobsStorage="DefaultEndpointsProtocol=https;Accoun..." 解决了问题,否则猜测某些字符会被错误处理

    【讨论】:

      【解决方案2】:

      这对我有用。我复制/粘贴的 Azure 门户中的连接字符串在字符串末尾包含“EndpointSuffix=core.windows.net”。当我使用它时,我得到了与上面相同的错误。当我简单地删除这部分连接字符串时,我能够成功连接。

      【讨论】:

        【解决方案3】:

        我错过了什么?我需要检查 Azure 中的一些其他设置以确保正确配置此方案吗?

        我可以重现您在提供 AzureWebJobsStorage 连接字符串格式时提到的问题。请尝试从连接字符串中删除EndpointSuffix=core.windows.net/;。然后它在我这边正常工作。

        local.settings.json:

        {
          "IsEncrypted": false,
          "Values": {
            "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=storageaccountname;AccountKey=xxxxxxxxxxxx",
            "AzureWebJobsDashboard": ""
          }
        }
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2020-07-01
          • 2012-12-04
          • 2021-01-18
          • 2021-10-22
          • 1970-01-01
          • 1970-01-01
          • 2021-10-26
          • 1970-01-01
          相关资源
          最近更新 更多