简体   繁体   中英

Why bot file missing from azure web app bot?

I make my web app bot in azure, then I download my code to work in that code with visual studio. when I decided to run that code, I realize it didnt come with a .bot file. So I dont have any way to test it in bot emulator.

I try to create my .bot but it's giving a error Post 500, or Internel Error

 {
      "name": "CoreBot",
      "services": [
        {
          "type": "endpoint",
          "name": "development",
          "endpoint": "http://localhost:3978/api/messages",
          "appId": "",
          "appPassword": "",
          "id": "1"
        },
        {
          "type": "endpoint",
          "name": "production",
          "endpoint": "https://CoreBot.azurewebsites.net/api/messages",
          "appId": "<YOUR APP ID>",
          "appPassword": "<YOUR APP PASSWORD>",
          "id": "2"
        }
      ],
      "padlock": "",
      "version": "2.0"
    }

Prior to the Bot Framework SDK 4.3 release, Microsoft Bot Framework offered the .bot file as a mechanism to manage resources. However, going forward it is recommended that you use appsettings.json for managing these resources as the .bot file has been deprecated. So the newer Echo and Basic bots don't have .bot files.

If you want to test your downloaded bot code with the Emulator, then you can follow these steps:

  • Debug the code on Visual Studio and it will open up a new window(localhost:3978) displaying the bot's name stating that the bot is ready.
  • Open the Bot Framework Emulator (make sure you have the latest version).
  • Click on the Open Bot option.
  • Add the Bot URL( http://localhost:3978/api/messages ) and click Connect(leave the App ID and App password blank).
  • Send a message to your bot to test its features.

Make sure you remove the App Id and App password from your appsettings.json file for local testing. You can refer to this for further clarification on how to manage bot resources.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM