Bot Framework V3的最新项目模板和仿真器引发500内部服务器错误 [英] Latest Project Template and Emulator for Bot Framework V3 throws 500 Internal Server Error

查看:81
本文介绍了Bot Framework V3的最新项目模板和仿真器引发500内部服务器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用最新的Bot应用程序模板创建了一个项目( http://aka.ms/bf-bc -vstemplate )

I created a project using the latest Bot Application Template (http://aka.ms/bf-bc-vstemplate)

我确保按照入门"页面(

I made sure that I installed the latest updates for Visual Studio 2015 (Community Edition) and the nuget packages following the exact steps in the Getting Started page (http://docs.botframework.com/en-us/csharp/builder/sdkreference/gettingstarted.html)

由于我正在本地进行测试,因此我也遵循了以下步骤:

I also followed these steps since I'm testing it locally:

与在本地运行的机器人一起使用模拟器时,您需要

When working with the emulator with a bot running locally, you need

您的机器人的网址设置了本地主机:从最后一个拉出 步. 注意:需要在您的网址中添加路径"/api/messages" 使用Bot应用程序模板时.清空MicrosoftAppId 字段中清空MicrosoftAppPassword字段

The Url for your bot set the localhost: pulled from the last step. Note: will need to add the path "/api/messages" to your URL when using the Bot Application template. Empty out the MicrosoftAppId field Empty out the MicrosoftAppPassword field

我对最新的模拟器进行了非常基本的测试( https://aka.ms/bf-bc -emulator )在VS 2015中运行Bot App项目之后.当我在模拟器中发送"Typing"活动时,我收到"500 Internal Server Error {"message":发生了错误."}".

I did a very basic test against the latest emulator(https://aka.ms/bf-bc-emulator) after running the Bot App project in VS 2015. When I send a "Typing" activity inside the Emulator, I received "500 Internal Server Error { "message":"An error has occurred." }".

但是,当我在BotAuthentication批注中添加评论时

But, when I place a comment on the BotAuthentication annotation

//[BotAuthentication]

在仿真器中发送"Typing"活动将发送"200 OK"响应.不幸的是,当我在模拟器中输入类似"Hello"的单词时,我收到"500 Internal Server Error {"message":发生了错误."}.

Sending a "Typing" activity inside the emulator sends a "200 OK" response. Unfortunately, when I type in a word like "Hello" in the emulator, I get the "500 Internal Server Error { "message":"An error has occurred." }".

知道为什么会这样吗?

Any idea why this is happening?

请注意,除了对BotAuthentication批注添加注释之外,我没有对默认项目进行任何代码更改.

Take note, I did not make any code changes to the default project except placing a comment to the BotAuthentication annotation.

仿真器的版本为3.0.0.54

The version of the Emulator is 3.0.0.54

更新: 模拟器显示"500 Internal Server Error {"message":发生错误."}后,在VS Output窗口中,我在VS Output窗口中看到抛出 Exception:mscorlib.dll中的'System.MissingMethodException'.

UPDATE: I see a Exception thrown: 'System.MissingMethodException' in mscorlib.dll in VS Output window after the emulator shows "500 Internal Server Error { "message":"An error has occurred." }".

更新

所以我在另一台计算机(Windows 8.1)上尝试了确切的设置,因为我正在使用的计算机是Win10评估版.猜猜是什么,它像一种魅力一样工作……所以我想那是操作系统问题,或者GAC搞砸了?

So I tried the exact setup in a different machine (Windows 8.1) because the machine I was working on is Win10 Evaluation. Guess what, it worked like a charm...so I guess it's an OS issue then or the GAC got messed up?

推荐答案

我遇到了同样的问题,我通过在Post方法中放置一个try Catch块来解决该问题.实际错误弹出

I faced the same issue and i figure out the issue by putting a try Catch block in the Postmethod. The actual error pop

解析机器人ID时出错

Error in resolving Bot Id

我只需将一个Web配置条目添加到我的机器人中,如下所示,它就开始工作了

I simply add a web config entry to my bot as below and it started working

 <add key="BotId" value="your app id"></add>

这篇关于Bot Framework V3的最新项目模板和仿真器引发500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆