我正在使用 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": ""
}
}
关于azure - 微软.WindowsAzure.存储: No valid combination of account information found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45517282/