1

我使用Azure的功能预览并要添加QueueTrigerFunction。Microsoft.WindowsAzure.Storage:账户信息没有有效的组合找到

的函数被定义为这样:

[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调试器时,得到以下错误消息:

[2017年8月5日上午01时07分56秒] Microsoft.WindowsAzure.Storage:发现 账户信息没有有效的组合。

我错过了什么? Azure中是否有一些其他设置需要检查以确保此场景配置正确?

回答

3

我缺少什么? Azure中是否有一些其他设置需要检查以确保此场景配置正确?

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

local.settings.json:

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

enter image description here

0

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

+0

这并不提供答案的问题。一旦你有足够的[声誉](https://stackoverflow.com/help/whats-reputation),你将可以[对任何帖子发表评论](https://stackoverflow.com/help/privileges/comment);相反,[提供不需要提问者澄清的答案](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-c​​an- I-DO-代替)。 - [来自评论](/ review/low-quality-posts/17667710) – 0p3n5ourcE