2016-11-15 9 views
0

有谁知道我为什么会收到此错误。 我已经设置了SendGrid输出绑定。错误索引方法FunctionName未解析为值

{ 
    "bindings": [ 
    { 
     "name": "docId", 
     "type": "queueTrigger", 
     "direction": "in", 
     "queueName": "movedocument", 
     "connection": "cpoffice365_STORAGE" 
    }, 
    { 
     "type": "sendGrid", 
     "name": "message", 
     "apiKey": "<MYSENDGRIDKEY>", 
     "from": "<MYFROMEMAIL>", 
     "direction": "out" 
    } 
    ], 
    "disabled": false 
} 

我的代码编译,但它然后在日志中引发此错误。

Microsoft.Azure.WebJobs.Host: Error indexing method 'Functions.<MYFUNCTIONAME>'. Microsoft.Azure.WebJobs.Host: '<MYSENDGRIDKEY>' does not resolve to a value. 

回答

2

Statto,

请确保您定义的应用程序设置(功能应用设置>应用程序设置)与姓名匹配你用什么为您绑定的配置,其中值是您Sendgrid关键。

绑定配置期望这是一个应用程序设置名称,而不是实际的键。

谢谢!

+0

谢谢。这是在任何地方的文件? – statto