Bot framework emulator not working

2019-02-27 00:00发布

I started learning bot framework last week, and i decided to start off with the default bot project that returns your input and its number of character. But unfortunately, I couldn't test the bot application in bot emulator. It can't just send my input. It displays "couldn't send" whenever I forward an input. My endpoint url which is http://localhost:3979/api/messages/ is correctly written there. What could be wrong? I'm just a starter in bot framework and bot building.

2条回答
疯言疯语
2楼-- · 2019-02-27 00:20

Check your visual studio .bot file. It should be like this.......

    {
        "name": "EmulatorBot",
        "description": "",
        "services": [
            {
                "type": "endpoint",[enter image description here][1]
                "endpoint": "http://localhost:3978/api/messages",
                "name": "EmulatorBot20181123022900",
                "id": "25"
            }
        ],
        "padlock": "",
        "version": "2.0",
        "path": "C:\\Users\\suraj.tiwari\\Desktop\\Bot NK\\EmulatorBot\\EmulatorBot.bot",
        "overrides": null
    }

Add an Endpoint for your bot

    Endpoint url : http://localhost:3978/api/messages
    Name : EmulatorBot20181123022900
查看更多
Fickle 薄情
3楼-- · 2019-02-27 00:33

As I'm not aware of the exact code which you are trying to execute, I'd suggest few points to be checked again.

Checkpoints:

  1. Make sure you are running the code in debug mode with any browser (Edge, chrome, explorer etc.) and then run in the emulator.
  2. Configure or link the emulator with ngrok. (Though it is not required when running locally but it may resolve if the emulator is not working with firewall issues)
  3. Please check the Microsoft App Id and Microsoft App Password are the same in emulator and Web.config file.
  4. Try with blank Microsoft App Id and Microsoft App Password in both Web.config file and emulator.
  5. Check if the endpoints on the browser and emulator are the same
  6. If you are encountering other errors like 401, 405, 500 please check this article.
  7. In case if all the check points are right and you are still encountering an issue while running the code in emulator, there might be an issue with the code or reference libraries. You can also check the working example.
查看更多
登录 后发表回答