1
votes

I'm using Bot Framework V4, C#, .NET Core 2.2 and VS 2019 to publish my application on Azure.

The bot works well via bot emulator on both local and remote instances. Hence I believe the application is fine from an authentication/authorization perspective.

However, it doesn’t work via Azure 'Test in Web Chat' module.

All typed messages get a:

‘Send failed. Retry.’

reply. The error message logged in the Channels module is:

There was an error sending this message to your bot: HTTP status code InternalServerError.

What could be wrong?

Autentication code snippet

Authentication variables result

1
Can you share your botHandle(Display Name in the Settings for the bot)? Also, are you have issues only in 'Test in Web Chat' or any other channel as well? When you test in web chat, can you check if you get any errors in the console of the Chrome Dev Tools(Ctrl+Shift+I)?Do you have Application Insights configured for your bot?ranusharao
Display Name: V4BellaConverse Messaging endpoint: v4bellaconverse.azurewebsites.net/api/messages . I'm also having issues while running it via Direct Channel. Application insights has just been activated. Now observing the Chrome Dev Tool the following error called my attention. [Microsoft_Azure_BotService] 1:27:27 PM MsPortalFx/Base/Base.Net Base.Net: Security issue: Request to send auth token to untrusted domain 'v4bellaconverse.scm.azurewebsites.net'. Only a fixed set of domains should be configured to receive auth tokens. It seems there is an authorization issue. Thoughts?Amintas Lopes Neto
Can you check your botHandle(in the bot settings) again? I can't see any logs or data for 'V4BellaConverse'.ranusharao
Thx. I've posted an screenshot of the botHandle at 1drv.ms/u/s!AnpERZZbH7htscpHfyydazWPfZQYqgAmintas Lopes Neto
On the log point I can see some activities generated via Emulator. More details at 1drv.ms/u/s!AnpERZZbH7htscpITNiBoK-Nki3s5w . I've just tried to republish the app and got to following message: An error occurred while starting the application. .NET Core 4.6.28008.02 X86 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 2.2.7-servicing-10089 | Microsoft Windows 10.0.14393 | Need help?Amintas Lopes Neto

1 Answers

0
votes

Posting this so that it helps others.

After having a look at your Startup.cs file, it appears that you are making use of bot files.

Prior to the Bot Framework SDK 4.3 release, Microsoft Botframework offered the .bot file as a mechanism to manage resources. However, going forward we recommend that you use appsettings.json or .env file for managing these resources. Bots that use .bot file will continue to work for now even though the .bot file has been deprecated.

It is always recommended to migrate the settings from .bot files to better manage resources. This documentation clearly explains on how to migrate settings from .bot file to manage resources.