在Azure上发布Bot V3后使用Bot Framework Emulator时出错 [英] Error while using Bot Framework Emulator after publishing a bot V3 on Azure

查看:88
本文介绍了在Azure上发布Bot V3后使用Bot Framework Emulator时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Bot Builder的1.1.0版本创建了一个非常简单的机器人,无论在本地还是在Azure上发布后,它都能正常工作.但是,当我更改为版本3(并更改了相应的代码)时,我的机器人在本地运行,但是在Azure上发布它后,它在Bot仿真器上却无法运行.我不知道我是否以错误的方式使用了仿真器,或者发布的是错误的.

I created a quite simple bot, using the version 1.1.0 of Bot Builder, and it worked fine, both locally and after publishing on Azure. However, when I changed to the version 3 (and changed the respective code), my bot is working locally, but it is not working (on Bot emulator) after I have published it on azure. I don't know if I am using the Emulator in a wrong way, or if I am publishing it wrongly.

我更改了webconfig的BotId,MicrosoftAppId和MicrosoftAppPassword标记.

I changed the BotId, MicrosoftAppId and MicrosoftAppPassword tags of the webconfig.

当我使用Azure页面上的测试到您的机器人的连接"按钮时,它会响应已接受".

When I use the button "Test connection to your bot" on Azure page, it responds "Accepted".

在模拟器上,我将Bot网址用作" https://XXXXXX.azurewebsites.net/api/messages ",作为" http://localhost:9000/"的仿真器URL以及相应的AppId和AppPassword. 模拟器的版本是3.0.0.59

On the emulator, I am using the Bot Url as "https://XXXXXX.azurewebsites.net/api/messages", the Emulator URL as "http://localhost:9000/" and the respective AppId and AppPassword. The version of the emulator is 3.0.0.59

当我尝试发起对话时,我收到500 InternalError {发生错误"}

When I try to iniciate a conversation, I receive the 500 InternalError {"An error has occurred"}

有什么错误的观念吗?

谢谢

推荐答案

消息正在路由到仿真器URL http://localhost :9000 这就是为什么它不起作用的原因. 尝试使用模拟器与云中的机器人进行交互时,您需要将消息转发到网络上的已知位置.为此,您可以使用ngrok.

The messages are being routed to the Emulator URL http://localhost:9000 that's why this is not working. You need to forward the messages to a known location out on the web when trying to interact with your bot in the cloud using the emulator. For that purpose, you can use ngrok.

This topic in the documentation explain how to do it. Basically you need to run ngrok in this way:

ngrok http -host-header =重写9000

ngrok http -host-header=rewrite 9000

然后更新仿真器,以在仿真器URL"文本框中使用https ngrok转发URL.

And then update the emulator to use the https ngrok forwarding URL in the Emulator URL textbox.

这篇关于在Azure上发布Bot V3后使用Bot Framework Emulator时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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