Azure Bot Channel Registration Corporate Network IIS hosted Bot

Chris T 1 Reputation point
2020-06-24T18:06:22.33+00:00

I have created a .Net Core 2.1 chat bot using the Microsoft Bot Framework sdk that is working when tested on localhost with the Bot Framework Emulator along with the Microsoft App Id and Secret. I then deployed the bot on a publicly accessible IIS web server with the proper SSL certificate and when navigating to its link the proper "Your bot is ready!" page appears showing that it is up and running.

I then created a Bot Channels Registration on Azure with the messaging endpoint to my bot hosted on my IIS web server. However, when I try the "Test in Web Chat" the bot shows nothing and presents no error in the user interface. I had issues with CORS policy of which I believe I resolved. I have also white listed the Microsoft urls that were listed on a help documents as needing to be white listed. Now when I check the Application Insights I have for the Bot Channel Registration, it lists the failures as "POST to Bot failed: POST to the bot's endpoint failed with HTTP status 500
Problem Id:System.Exception at Microsoft.Bot.ChannelConnector.BotAPI.ThrowOnFailedStatusCode". The Call Stack is below. Thank you in advance for your help.

Microsoft.Bot.Schema.BotException:

at Microsoft.Bot.ChannelConnector.BotAPI+<PostActivityToBotAsync>d__36.MoveNext (Microsoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=nullMicrosoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=null: D:\a\1\s\ChannelSDK\Microsoft.Bot.Base.ChannelConnector\API\BotAPI.csMicrosoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=null: 480)
Inner exception System.Exception handled at Microsoft.Bot.ChannelConnector.BotAPI+<PostActivityToBotAsync>d__36.MoveNext:
at Microsoft.Bot.ChannelConnector.BotAPI.ThrowOnFailedStatusCode (Microsoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=nullMicrosoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=null: D:\a\1\s\ChannelSDK\Microsoft.Bot.Base.ChannelConnector\API\BotAPI.csMicrosoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=null: 637)
at Microsoft.Bot.ChannelConnector.BotAPI+<PostActivityToBotAsync>d__36.MoveNext (Microsoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=nullMicrosoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=null: D:\a\1\s\ChannelSDK\Microsoft.Bot.Base.ChannelConnector\API\BotAPI.csMicrosoft.Bot.Base.ChannelConnector, Version=3.2.3.10, Culture=neutral, PublicKeyToken=null: 462)

Azure AI Bot Service
Azure AI Bot Service
An Azure service that provides an integrated environment for bot development.
756 questions
{count} votes