How to resolve the error as “500 internal server error” in Bot Framework Channel Emulator?

前端 未结 7 1466
既然无缘
既然无缘 2021-02-09 08:20

I am working on Bot framework technology, recently Microsoft announced the new version (V3) of bot. I was already developed bots using old version, now I am trying to upgrade m

相关标签:
7条回答
  • 2021-02-09 08:59

    Druing the debugging, you just dont disable the appid and password, rather make them blank and rebuild the same , you will be able to debug via emulator Keep like given below

    Dont just disable the BotId,AppID, Password rather make them blank like given below

    <add key="BotId" value="" />
    <add key="MicrosoftAppId" value="" />
    <add key="MicrosoftAppPassword" value="" />
    
    0 讨论(0)
  • 2021-02-09 09:02

    I discovered that a single public method apart from Post in Controller makes Bot Framework throw 500 InternalServerError. Simply keep only private and public Post method in your Controller and that should fix it.

    0 讨论(0)
  • 2021-02-09 09:10

    ngrok solution did not work for me. I just commented the botAuthentication and then it worked for me locally.

      //[BotAuthentication]
        public class MessagesController : ApiController
        {
    
    0 讨论(0)
  • 2021-02-09 09:14

    The developer posted an answer on this thread.

    Basically you can type 'disable' to disable AppId/AppPassword

    0 讨论(0)
  • 2021-02-09 09:18
    • Please download the file from https://ngrok.com/download

    • Unzip the file and use command prompt to run the below command

    ngrok http -host-header=rewrite 9000

    screenshot

    • As seen in screenshot copy Forwarding URL with https and paste it in Emulator url
    • Emulator port should be in 9000 and emulator Url should contain ngrok forwarding Https URL

    Note :ngrok should be in running state .if your getting same 500 error while trying next time please start from step 1. For more reference .https//docs.botframework.com/en-us/tools/bot-framework-emulator/#navtitle

    0 讨论(0)
  • 2021-02-09 09:21

    It seems that if you deploy your bot to the cloud and try to test it from the emulator it will give this error. The emulator seemed to work in 2 cases:

    1- Localhost with security disabled (remove appid and app password)

    2- localhost with security enabled (add appid and app password)

    both endpoints via http only because it's localhost. If you deploy to the cloud you can test it in the emulator available on the Bot Portal. Make sure the endpoint for the hosted bot is https enabled.

    I followed the steps in this troubleshoot guide and it fixed it for me: https://docs.microsoft.com/en-us/bot-framework/troubleshoot-authentication-problems

    I didn't understand what actually caused the problem though. What I noticed was: desktop emulator works with localhost only.

    0 讨论(0)
提交回复
热议问题