Search code examples
c#azurebotframework

Direct Channel Bot Publishing Issue (bot framework V4)


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


Solution

  • 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.