【问题标题】:How is serviceUrl of a bot (created using MS bot framework) decided机器人的 serviceUrl(使用 MS 机器人框架创建)是如何决定的
【发布时间】:2018-01-18 22:25:08
【问题描述】:

我最近将我的 MS bot 代码(使用 MS bot 框架创建到我的新笔记本电脑中)。但是,在模拟器中,两台笔记本电脑的行为有所不同。

机器人作为应用服务托管在 Azure 云中。

在我的旧笔记本电脑中,当我发送消息时,serviceUrl 被设置为一个 ngrok URL(我不知道如何,这就是我想要弄清楚的)。

在我的新笔记本电脑中,我无法在新笔记本电脑中测试机器人并且模拟器不断抱怨

[03:51:09] Error: The bot is remote, but the callback URL is localhost. Without tunneling software you will not receive replies. 
[03:51:09] Connecting to bots hosted remotely 
[03:51:09] Edit ngrok settings 
[03:51:09] Error: The bot is remote, but the callback URL is localhost. Without tunneling software you will not receive replies. 
[03:51:09] Connecting to bots hosted remotely 
[03:51:09] Edit ngrok settings 
[03:51:11] -> POST 200 [conversationUpdate] 
[03:51:11] -> POST 200 [conversationUpdate] 
[03:51:15] Error: The bot is remote, but the callback URL is localhost. Without tunneling software you will not receive replies. 
[03:51:15] Connecting to bots hosted remotely 
[03:51:15] Edit ngrok settings 
[03:51:16] -> POST Request to 'https://something.azurewebsites.net/api/messages' failed: [500] Internal Server Error 

我已经编辑了 ngrok 设置,为它提供了 ngrok exe 的路径。

谁能告诉我服务网址是如何决定的?我不知道为什么它可以在一台笔记本电脑上运行,但不能在另一台笔记本电脑上运行。

谢谢

【问题讨论】:

  • 我很困惑,如果你的意思是 endpointserviceUrl ngrok 永远不会用于 serviceUrl。
  • Without tunneling software 在模拟器App设置上配置ngrok的路径后,请务必点击SAVE。此外,早期版本可能不兼容,请检查您的 ngrok 版本。

标签: azure botframework


【解决方案1】:

首先确保你运行的是ngork 2.1.18或更新的版本,然后,打开模拟器的App Settings对话框,输入ngrok的路径,选择本地地址是否绕过ngrok,点击保存。@987654321 @

我建议检查以下link,它有更多关于设置的详细信息。

【讨论】:

    猜你喜欢
    • 2018-04-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-25
    • 2020-01-22
    • 1970-01-01
    • 2021-11-23
    • 2016-04-26
    • 1970-01-01
    相关资源
    最近更新 更多