Microsoft.WindowsAzure.Storage: 未找到有效的帐户信息组合

Microsoft.WindowsAzure.Storage: No valid combination of account information found

我正在使用 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: No valid combination of account information found.

我错过了什么?我需要检查 Azure 中是否有一些额外的设置以确保此方案配置正确?

What am I missing? Is there some additional settings in Azure I need to check to make sure this scenario is correctly configured?

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

local.settings.json:

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

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

我有一个类似的问题,就是连接失败。

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

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

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