c# - 在 Azure 中运行队列触发器函数时出现错误 : The input is not a valid Base-64 string. ..

标签 c# azure visual-studio-code azure-functions queuetrigger

我是 Azure 函数的新手。我想设置一个队列触发函数来消耗队列中的项目。其中队列是与主队列分离的并行队列。

但是当我运行它时,它不断显示:

 Executed 'QueueTrigger2' (Failed, Id=33e2634c-1c00-4996-a81a-fec47c088d73, Duration=163ms)
[2022-06-21T18:38:48.866Z] System.Private.CoreLib: Exception while executing function: QueueTrigger2. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'myQueueItem'. System.Private.CoreLib: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

这是否意味着我的队列中的消息类型不正确?但它是来自主进程队列的并行队列。所以我确信这是正确的。 或者我需要在输入之前进行一些转换?

谢谢。

最佳答案

将消息发布到服务总线队列以供 Azure 函数使用时,必须首先对消息进行 Base64 编码。在这里回答:https://stackoverflow.com/a/65000524/879247

关于c# - 在 Azure 中运行队列触发器函数时出现错误 : The input is not a valid Base-64 string. ..,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72705726/

相关文章:

c# - 如果 EF Core 中的模型在没有迁移的情况下发生变化,则删除数据库

openid - 在 Azure 中使用 OpenID 身份验证的最佳方式?

azure - 自动刷新 token 并添加新的用户安全组 Azure AD

shell - VSCode 终端 : How to display execution time?

c# - 我正在尝试使用以下代码片段在 C# 中运行 R 脚本。但是输出会重复

c# - C#中级联删除异常的处理方法

c# - 实例化一个类对象并初始化一个列表

azure - 使用 Azure Data Lake Analytics 与传统 ETL 方法的原因

reactjs - Visual Studio Code : navigate to jsx components

git - VS Code远程容器:容器中的开放存储库