我使用Bot Framework V4中的echo bot模板创建一个项目。所有东西都在模拟器上工作。
我使用选项Bot Channels Registration
在Azure上创建了机器人,因为我想将我的机器人托管在AWS中,并且需要创建一个Skype Bot。
我正在使用Ngrok来测试我的机器人,所有事情都可以通过网络聊天正常运行,但是在Skype中,我在Ngrok日志中收到了500。
调试,我发现以下错误: 操作返回了无效的状态代码“禁止”
StackTrace:
at Microsoft.Bot.Connector.Conversations.ReplyToActivityWithHttpMessagesAsync(String conversationId, String activityId, Activity activity, Dictionary`2 customHeaders, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Connector\Conversations.cs:line 1121 at Microsoft.Bot.Connector.ConversationsExtensions.ReplyToActivityAsync(IConversations operations, String conversationId, String activityId, Activity activity, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Connector\ConversationsExtensions.cs:line 241 at Microsoft.Bot.Builder.BotFrameworkAdapter.SendActivitiesAsync(ITurnContext turnContext, Activity[] activities, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 327 at Microsoft.Bot.Builder.TurnContext.<>c__DisplayClass22_0.<<SendActivitiesAsync>g__SendActivitiesThroughAdapter|1>d.MoveNext() in d:\a\1\s\libraries\Microsoft.Bot.Builder\TurnContext.cs:line 267 --- End of stack trace from previous location where exception was thrown --- at Microsoft.Bot.Builder.TurnContext.SendActivityAsync(IActivity activity, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\TurnContext.cs:line 196 at mcBotFrameworkTemplate.Bots.EchoBot.OnMessageActivityAsync(ITurnContext`1 turnContext, CancellationToken cancellationToken) in G:\0 - Projetos\BotFramework-PoC\mcBotFrameworkTemplate\mcBotFrameworkTemplate\Bots\EchoBot.cs:line 29 at Microsoft.Bot.Builder.BotFrameworkAdapter.TenantIdWorkaroundForTeamsMiddleware.OnTurnAsync(ITurnContext turnContext, NextDelegate next, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 964 at Microsoft.Bot.Builder.MiddlewareSet.ReceiveActivityWithStatusAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\MiddlewareSet.cs:line 55 at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotAdapter.cs:line 167 at Microsoft.Bot.Builder.BotAdapter.RunPipelineAsync(ITurnContext turnContext, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotAdapter.cs:line 177 at Microsoft.Bot.Builder.BotFrameworkAdapter.ProcessActivityAsync(ClaimsIdentity identity, Activity activity, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 244 at Microsoft.Bot.Builder.BotFrameworkAdapter.ProcessActivityAsync(String authHeader, Activity activity, BotCallbackHandler callback, CancellationToken cancellationToken) in d:\a\1\s\libraries\Microsoft.Bot.Builder\BotFrameworkAdapter.cs:line 215 at Microsoft.Bot.Builder.Integration.AspNet.Core.BotFrameworkHttpAdapter.ProcessAsync(HttpRequest httpRequest, HttpResponse httpResponse, IBot bot, CancellationToken cancellationToken) in d:\a\1\s\libraries\integration\Microsoft.Bot.Builder.Integration.AspNet.Core\BotFrameworkHttpAdapter.cs:line 56 at mcBotFrameworkTemplate.Controllers.BotController.PostAsync() in G:\0 - Projetos\BotFramework-PoC\mcBotFrameworkTemplate\mcBotFrameworkTemplate\Controllers\BotController.cs:line 36
我需要做什么?我按照我发现的所有教程和操作方法进行操作,但对Skype无效。
在此先感谢您的帮助。