gpt4 book ai didi

c# - Azure 函数 : Value cannot be null. 参数名称:source

转载 作者:行者123 更新时间:2023-11-30 15:14:37 25 4
gpt4 key购买 nike

最近,当我调用我的 Azure 函数时,每当我尝试向 AddGroup 函数发出 HTTP 请求时,我都会看到此异常。

  • 在我更新了一些 NuGet 包(特别是 Newtonsoft JSON 11.0.2)之前它一直有效
  • 当我在本地运行函数时它工作正常 - 这与 Azure 有关
  • 我已多次推送新代码并重新启动该功能
  • 这里的其他问题说这可能是连接字符串问题,但是,同样,它在我的本地机器上工作,我没有触及连接字符串
  • 当我尝试附加云调试器时,异常在它到达我的代码中的任何断点之前就出现了。

有什么想法吗?

Time 11:04:02 AM
Exception type Microsoft.Azure.WebJobs.Host.FunctionInvocationException
Exception message Exception while executing function: AddGroup <--- Value cannot be null. Parameter name: source
Host.Results
Microsoft.Azure.WebJobs.Host.FunctionInvocationException: Exception while executing function: AddGroup ---> System.ArgumentNullException: Value cannot be null.

Parameter name: source

at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.FunctionInvocationFilterInvoker.<InvokeAsync>d__9.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<InvokeAsync>d__24.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithWatchersAsync>d__23.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__22.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)

at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__16.MoveNext()

--- End of inner exception stack trace ---

at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<ExecuteWithLoggingAsync>d__16.MoveNext()

--- End of stack trace from previous location where exception was thrown ---

at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)

at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)

at Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.<TryExecuteAsync>d__13.MoveNext()

最佳答案

我想通了 - 我遇到了 NuGet 包冲突。我的一个项目试图引用版本 Newtonsoft Json 9.0.1(Azure Functions SDK 所依赖的版本)以及另一个项目想要的版本 11.0.2。我最终让另一个项目也使用了 9.0.1 版本的包。

关于c# - Azure 函数 : Value cannot be null. 参数名称:source,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54243467/

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