Bot Framework Direct Line 502错误

问题描述:

我一直试图使用html上的这段代码通过DirectLine连接到我的机器人.

I have been trying to connect to my bot via DirectLine using this code on an html.

<!DOCTYPE html>
<html>
  <head>
    <link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
  </head>
  <body>
    <div id="bot"/>
    <script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
    <script>
      BotChat.App({
        directLine: { secret: 'xxxxx' },
        user: { id: 'userid' },
        bot: { id: 'botid' },
        resize: 'detect'
      }, document.getElementById("bot"));
    </script>
  </body>
</html>

我已经检查了直线机密,可以.当我测试此代码时,会出现聊天消息,并且您会收到Hello!我在机器人上设置的消息,但是当我尝试向机器人发送消息时,我从Web浏览器在控制台上收到此错误

I already checked the direct line secret and it is okay. When I test this code, the chat appears and I recieve the Hello! message I set up on the bot but when I try to send a message to the bot I get this error on console from web browser

如何正确使用DirectLine或代码中缺少什么来发送消息?

How can I use the DirectLine properly or what am I missing from the code for it to send the messages?

我检查了 Azure状态历史记录,并发现与bot服务有关的问题出现在6/14上,这可能导致与bot的通信无法按预期进行.

I checked the Azure status history and find a issue with bot service appeared on 6/14, which might cause communicating with bot not work as expected.