Im getting below error(Img:1) in Web Chat channel after deploying the code, upto lastweek it is working fine but suddenly im getting the untrusted Origin error in browser console of Web App bot service and couldn't able to connect to the bot using "Test in Web Chat" feature. I have attached the Untrusted Origin error screen shot(Img:2) below. I am using .bot file as managing resource with Development and Production( Micorsoft AppId , App paswword, endpoint). I tried migrating .bot file to Appsettings(( Micorsoft AppId , App paswword, endpoint) as the managing resource but still getting the same error. Please help with the resolution for the error.

Img:1 enter image description here

Img:2 enter image description here

2

There are 2 best solutions below

0
On

Here are the some of the resources need to check.

Kindly check the below points:

  1. Check whether the messaging endpoint specified in settings in portal is correct or not. Please check with the path at the URL end (../api/messages)
  2. Verify the bot configuration settings to check with whether using any incorrect APP ID and Password
  3. The Messaging endpoint specified on the Settings page for your bot in the Bot Framework Portal does not begin with https or is not trusted by the Bot Framework. Your bot must have a valid, chain-trusted certificate.

Alternate Options:

  1. Under 'TLS/SSL settings' --> set 'HTTPS Only' to 'On'.

For reference on similar issue kindly go through the below link:

There was an error sending this message to your bot - Test in Web Chat

0
On

I believe you have Enhanced Authentication enabled in the Directline channel and don't have the domain setup as a trusted origin.

https://learn.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-authentication?view=azure-bot-service-4.0#security-considerations