【发布时间】:2020-11-15 13:21:30
【问题描述】:
我试图设置简单的 Azure 函数来读取 XML 流并将其同步回数据库。我的计划是使用时间触发器每天执行一次函数。
但是,事情看起来不太好。即使我不使用数据库,我也会收到以下错误:
[Error] Executed 'Functions.<func-name>' (Failed, Id=<func-id>, Duration=1ms)Value cannot be null. (Parameter 'connectionString')
我目前正在尝试执行以下功能:
module.exports = async function(context, req) {
context.res = {
body: "Success!"
};
};
同样的结果。我无法运行它。
我已将连接字符串添加到配置 -> 连接字符串(根据消息,我认为我错过了)。
我的 functions.json 文件如下所示:
{
"bindings": [
{
"name": "myTimer",
"type": "timerTrigger",
"direction": "in",
"schedule": "0 0 * * * *"
},
{
"type": "http",
"direction": "out",
"name": "res"
}
]
}
我也尝试过运行 C# 函数 - 结果相同。
那么,我错过了什么?
【问题讨论】:
标签: javascript azure azure-functions