1
votes

I have created a chatbot using Microsoft BotFramework and deployed to Azure(web app bot). I wanted to debug the bot when the request is coming from other channels such as Skype or WebChat. I used ngrok and ran the following command to set up tunneling (localhost as public URL) and updated the messaging endpoint URL in Azure portal under settings of Bot.

ngrok http -host-header=rewrite localhost:123789

But when I request from webchat or Skype I see logging on ngrok command line(see screenshot) but the debugger is not triggered (Chatbot also not working). How can I debug my bot?

enter image description here

2

2 Answers

1
votes

There are a few things that need to happen in order for you to send traffic thru ngrok.

  • Have ngrok running (which you do). I use this command when connecting thru ngrok: ngrok http 3978 -host-header="localhost:3978"
  • Set the messaging endpoint in the settings blade for your ABS bot in Azure. Should look something like this: https://274d521a.ngrok.io/api/messages
  • If you use emulator, also set the endpoint to the above.
  • Include the MicrosoftAppId and MicrosoftPassword for your bot in the local bot's settings (.env file or however you specify) as well as in Emulator, if used.

You should be good to go at that point.

Hope of help!

0
votes

Following are the steps 1) Fire up ngrok.exe on your local machine. 2) Copy the hostname generated by the ngrok into the messaging end point of your bot channels registration (e.g https://abc.io/api/messages) 3) Most important is to run the bot locally in IIS express on the same port which you used with ngrok Once you send the message from skype or webchat, the bot will catch the request at the debug point