Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/azure/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Azure函数:无法将触发器转换为CosmosDBTrigger_C#_Azure_Azure Cosmosdb_Azure Functions - Fatal编程技术网

C# Azure函数:无法将触发器转换为CosmosDBTrigger

C# Azure函数:无法将触发器转换为CosmosDBTrigger,c#,azure,azure-cosmosdb,azure-functions,C#,Azure,Azure Cosmosdb,Azure Functions,我只是在Azure门户中创建一个新的CosmosDBTrigger,并将其连接到我的Cosmos DB。没有改变任何事情。只是遵循默认值 当我运行它时,我得到这个问题标题中的文本异常。以下是完整日志: Exception while executing function: Functions.Test Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: Fun

我只是在Azure门户中创建一个新的CosmosDBTrigger,并将其连接到我的Cosmos DB。没有改变任何事情。只是遵循默认值

当我运行它时,我得到这个问题标题中的文本异常。以下是完整日志:

Exception while executing function: Functions.Test
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: Functions.Test ---> System.InvalidOperationException : Exception binding parameter 'documents' ---> System.InvalidOperationException : Unable to convert trigger to CosmosDBTrigger.   
   at Microsoft.Azure.WebJobs.Extensions.DocumentDB.CosmosDBTriggerBinding.BindAsync(Object value,ValueBindingContext context) 
   at async Microsoft.Azure.WebJobs.Host.Triggers.TriggeredFunctionBinding`1.BindCoreAsync[TTriggerValue](ValueBindingContext context,Object value,IDictionary`2 parameters)    
   End of inner exception   
   at Microsoft.Azure.WebJobs.Host.Executors.DelayedException.Throw()   
   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstance instance,ParameterHelper parameterHelper,TraceWriter traceWriter,CancellationTokenSource functionCancellationTokenSource)  
   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)  
   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)    
   End of inner exception
这很奇怪。我记得一个月前也是这样做的。好像最近有什么东西坏了。通过谷歌搜索这条消息,可以得到上个月的三个无用结果

我能做什么?当一切正常时,我可以切换到某个东西的旧版本吗?

@psfinaki如果您从Azure门户,您必须在受监视的集合中创建更新文档才能运行触发器


运行选项在Azure portal for Cosmos DB触发器中不应存在或应禁用,因为它与直接支持“运行”选项的其他类型的触发器选项不同

如果你能愉快地提供一份遗嘱,那就太棒了,但是你想让我补充什么呢?我只是在门户上点击一下。run.csx等于我指定的文档中的代码。function.json仅在集合和数据库名称上有所不同。您可以参考此项来创建触发器的项集合,以运行cosmos触发器函数。