Microsoft bot framework v3 webchat channel not working with ngrok - botframework

I created chatbot with microsoft bot framework v3.
I use mssql server 2017 database.
It runs perfectly on emulator. After that I registered my chatbot on azure through Bot channel registration.
Then I save AppId and Password etc in web.config and also in emulator and tested, It runs without any error.
I use ngrok , as ngrok http 3979 it gives me https://........ngrok.io and I save that access point in azure bot reg endpoint with api/messages.
Then I get embed code with key and placed in page.html and when I send message it gives me error as:

Yes I'm using webchat and here the screenshots
webconfig and running emulator
ngrok http 3979 and also save it azure settings as endpoint
When run django app, say hi

Related

Ms Teams HelloWorld Sample: Emulator not working: 401 Unauthorized

I have the HelloWorld app sample running (browser launches: http://localhost:3333/)
In Bot Framework Emulator, I open a Bot (http://localhost:3333/api/messages) and connect.
I write a message and I see:
Cannot post activity. Unauthorized.
POST 401 directline.postActivity
I have tried with and without ngrok, but I suppose that is not the problem.
What can be wrong?
Thanks,
Diego
I got it. Once I saw that Emulator requires empty 'Appid' and 'PasswordId' values (appsettings.json), I tried to get my BOT running in Teams client.
Now I have my application running locally and a Bot created in Teams client which can interact with it using a ngrok redirection
The key was to create the bot from Team client (not in dev.botframework.com/bots) logged with the same user than in Azure portal, and using App Studio.
Then an app is automatically created in Azure portal (NewApp).
Important:
App Id in appsettings.json is the one created from App Studio Bots option. It is also in Azure portal: App registrations-NewApp-'Application (client) ID'. And also twice in botframework (NewBot Settings: 'Bot handle' and 'Configuration'-'Paste your appId below...')
In App Studio 'app creation' there is another 'App ID' in App Details. It is not required to be the same.
App password in appsettings.json is the one created in App Studio (App Password -> Generate). It is also in in Azure portal: App registrations-NewApp-Certificates&secrets/Client secrets
ngrok url must be added in App Studio bot (Messaging endpoint: 'https://xxxxxx.ngrok.io'). It is also in botframework (NewBot Settings-Messaging endpoint)

Cannot Add authentication to your bot via Azure Bot Service

I want to try the demo on Add authentication to your bot via Azure Bot Service which based on the document https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-tutorial-authentication?view=azure-bot-service-3.0, what i am using is Demonstrates OAuthCard support in the v3 C# SDK, using AAD v2, but i always failed when i use bot emulator to connect the bot service.
i think i set the correct the settings in the webconfig.

Endpoint URL has an invalid value

I am trying to register my Bot at https://dev.botframework.com
However, when I put https://localhost:44338/api/messages in the
Messaging endpoint field I get an error - Endpoint URL has an invalid
value. My bot is running locally on https://localhost:44338.
Also is there any way I can create my own web client which can
communicate with my Bot.
Is Bot Registration mandatory for it to be deployed in production.
It looks like you're trying to register your bot with your local instance whereas you need to use a deployed (production) instance.
Publish your bot to Azure and use the URL you get from that. In Visual Studio you can right click your project and select "Publish"- just follow the instructions from there.
You can make your own client, yes. You can use your browser or anything else to make HTTP requests to your production bot.
You need to register your bot if you're using the bot connector.
Hope that helps.

Unable to test in microsoft chat bot registration

When I test my chat bot on the bot registration page I am getting a "MethodNotAllowed" error
The page you are looking for cannot be displayed because an invalid
method (HTTP verb) is being used.
The bot is published as azure app service, and was working fine in the emulator using the bots appid and password.
As it's stated in Bot Framework documention
Your bot communicates to the Bot Connector Service using HTTP over a
secured channel (SSL/TLS)
So please make sure you are using HTTPS instead of HTTP, and if url is properly set in dev portal.

Microsoft Bot Framework bot not working in Microsoft Teams when using ngrok

My Bot is working in the Emulator and through other channels but it's not working on Microsoft Teams.
I able to see other channels requests and responses statuss in ngrok. But when using Microsoft Teams, request are not even hitting my server URL (ngrok).
App ID :dfc6ac0d-e805-4a40-9fd3-7c4678b7ae88
(It's not duplicate of Unable to use bot from Teams)
Hello: I was able to access the Bot and get a response (character count of my message.) Perhaps you didn't enable sideloading of bots in the Office Admin Portal? https://msdn.microsoft.com/en-us/microsoft-teams/setup

Resources