Bot framework emulator not working

给你一囗甜甜゛ 提交于 2019-12-20 02:58:17

问题


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.


回答1:


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.



回答2:


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


来源:https://stackoverflow.com/questions/42611413/bot-framework-emulator-not-working

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!