c# - Microsoft.Bot.Schema.ErrorResponseException : Operation returned an invalid status code 'BadRequest'

标签 c# .net-core botframework bots

感谢您查看我的问题。

异常如题。

它部署在 AWS 服务器上并与 Skype 集成。

当我使用机器人模拟器在本地测试我的应用程序时,Microsoft.Bot.Schema.ErrorResponseException 没有发生。

它仅在使用 Skype 时发生。

环境:

  • Microsoft.Bot.Builder 4.2.2
  • Microsoft.Bot.Builder.AI.Luis 4.2.2
  • Microsoft.Bot.Builder.AI.QnA 4.2.2
  • Microsoft.Bot.Connector 4.2.2
Microsoft.Bot.Schema.ErrorResponseException: Operation returned an invalid status code 'BadRequest'
at Microsoft.Bot.Connector.Conversations.ReplyToActivityWithHttpMessagesAsync(String conversationId, String activityId, Activity activity, Dictionary`2 customHeaders, CancellationToken cancellationToken)
at Microsoft.Bot.Connector.ConversationsExtensions.ReplyToActivityAsync(IConversations operations, String conversationId, String activityId, Activity activity, CancellationToken cancellationToken)
at Microsoft.Bot.Builder.BotFrameworkAdapter.SendActivitiesAsync(ITurnContext turnContext, Activity[] activities, CancellationToken cancellationToken)
at Microsoft.Bot.Builder.TurnContext.<>c__DisplayClass22_0.<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---

有人知道这个错误的可能原因吗?

再次感谢您对我的帮助。

最佳答案

因为在我发送的消息中,它包含 HTML 标记。 所以这可能会使应用程序崩溃。

关于c# - Microsoft.Bot.Schema.ErrorResponseException : Operation returned an invalid status code 'BadRequest' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54859262/

相关文章:

c# - 启动后添加新的 FileServer 位置(启动后编辑中间件)

azure - 如何解决 Luis - 403 通话中通话量配额问题

c# - 在 FormFlow、BotFramework 中使用 List<T> 时缺少第一个选项

c# - 当 HttpContext.Current 为空时,如何在 Elmah 的 ErrorMail_Mailing 事件中的 C# 中获取服务器变量(或至少客户端 IP 地址)?

mysql - DotnetCore2.0 webapi 中的 EntityFrameworkCore MySql 错误

c# - 我应该为枚举扩展方法使用 ArgumentException 还是 InvalidEnumArgumentException?

c# - 在 ASP.NET Core 中也延迟加载后虚拟属性未加载

azure - LUIS 中的批量测试对列出的实体的预测不正确

c# - Linq 选择特定索引处的数组值

c# - 字母数字计数器