相关疑难解决方法(0)

当我尝试使用服务总线触发功能时,收到错误消息“无法转换输入参数”,为什么?

有没有办法创建需要对象作为ServiceBusReceivedMessage参数的天蓝色函数?像这样:

[Function("Function1")]
public static void Run(
    [ServiceBusTrigger("...", "...", Connection = "...")] ServiceBusReceivedMessage  msg)
Run Code Online (Sandbox Code Playgroud)

我为此类创建了一些扩展方法,因此使用此类对我来说很有用。

我注意到本教程Azure Functions 的 Azure 服务总线绑定

我正在使用 .net 5,并且已通过 nuget 包 Microsoft.Azure.WebJobs.Extensions.ServiceBus 安装了 beta-5 版本,但是当我尝试接收消息时,我看到此错误:

异常:Microsoft.Azure.Functions.Worker.Diagnostics.Exceptions.FunctionInputConverterException:转换函数“Function1”的 1 个输入参数时出错:无法将输入参数“msg”从类型“System.Web.Messaging.ServiceBus.ServiceBusReceivedMessage”转换为类型“Azure.Messaging.ServiceBus.ServiceBusReceivedMessage”。细绳'。

不确定我是否错过了什么或者是否有可能

c# azure azureservicebus azure-functions

6
推荐指数
1
解决办法
4491
查看次数

标签 统计

azure ×1

azure-functions ×1

azureservicebus ×1

c# ×1