gpt4 book ai didi

c# - Azure Function 部署后不工作

转载 作者:行者123 更新时间:2023-12-03 01:42:43 29 4
gpt4 key购买 nike

我正在使用 Azure 函数进行一些 POC。我已经从 VS 模板创建了一个简单的 HttpTrigger 函数,如果我在本地主机中进行调试,一切都可以正常工作,但是如果我在 Azure 中部署,当我尝试启动该函数时会收到错误消息:

An error has occurred. For more information, please check the logs for error ID 24d8e48f-d925-45ad-82cf-f767decc5f6f

如果我检查 Insights,错误为:

Error indexing method 'Saluda.Run' Cannot bind parameter 'log' to type TraceWriter. Make sure the parameter Type is supported by the binding. If you're using binding extensions (e.g. ServiceBus, Timers, etc.) make sure you've called the registration method for the extension(s) in your startup code (e.g. config.UseServiceBus(), config.UseTimers(), etc.).

调用堆栈:

Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexingException: at Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexer+d__19.MoveNext (Microsoft.Azure.WebJobs.Host, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexer+d__15.MoveNext (Microsoft.Azure.WebJobs.Host, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) Inner exception System.InvalidOperationException handled at Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexer+d__19.MoveNext: at Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexer+d__20.MoveNext (Microsoft.Azure.WebJobs.Host, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089) at Microsoft.Azure.WebJobs.Host.Indexers.FunctionIndexer+d__19.MoveNext (Microsoft.Azure.WebJobs.Host, Version=2.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)

我使用的是 Microsoft.NET.Sdk.Functions 1.0.14(最后一个),AzureWebJobsDashboard 和 AzureWebJobsStorage 在函数应用程序设置中配置。如果我直接在门户中创建一个函数,它就可以工作。

有什么想法吗?

非常感谢。

Function code

Configuration

Insights error

最佳答案

关于c# - Azure Function 部署后不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51308722/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com