没有注册过类型为'Microsoft.Bot.Builder.Integration.IAdapterIntegration'的服务。

问题描述 投票:0回答:1

我想部署用微信开发的机器人。微软机器人框架 使用 网络网核心 和机器人框架 v4蔚蓝 云端. 但我越来越

"没有注册'Microsoft.Bot.Builder.Integration.IAdapterIntegration'类型的服务。"

的错误。但我的解决方案在使用机器人模拟器与相同的机器人文件时,在本地正常工作。无法找出其中的具体问题。

试着通过安装dotnet core的扩展来改变Azure APP服务,但没有用。

我已经使用机器人框架企业模板

我得到 "没有为'Microsoft.Bot.Builder.Integration.IAdapterIntegration'类型注册服务 "的错误。

我需要应用程序在网络聊天频道的 azure 应用程序服务中运行。

azure botframework .net-core-2.2
1个回答
0
投票

我今天遇到了同样的问题,我不知道为什么需要这样做,但我不得不注册了 IAdapterIntegration 在DI容器中明文规定。

   services.AddSingleton<IAdapterIntegration, AdapterWithErrorHandler>();

The AdapterWithErrorHandler 在我看来,是一个扩展版的 BotFrameworkHttpAdapter:

 public class AdapterWithErrorHandler : BotFrameworkHttpAdapter 
© www.soinside.com 2019 - 2024. All rights reserved.