I have deployed a chatbot with LUIS and QnA Maker. It works perfectly locally when I run it on Emulator. It loads up the adaptive cards at start of the chat and I get correct replies from LUIS.
However when I deploy the bot on Azure and test it on Web chat it gives the following error:
There was an error sending this message to your bot: HTTP status code InternalServerError
This is how my web.config looks like:
<configuration>
<appSettings>
<!-- update these with your BotId, Microsoft App Id and your Microsoft App Password-->
<add key="BotId" value="BotLuis" />
<add key="MicrosoftAppId" value="9f9564ef-d627-450f-b943-98b7338c0f31" />
<add key="MicrosoftAppPassword" value="myapp-password" />
</appSettings>
I get the values for AppID and AppPassword from the Applications setting of the web bot I created on Azure. I know they are correct since I used these values to setup locally using Emulator.
I deploy the code from github to Azure. My bot loads up just fine (The adaptive cards show) on azure web chat but after that any input I give to it, whether it is interactive card or chat command, I get the above error.
The application Insight shows the following exception:
POST to BotLuis failed: POST to the bot's endpoint failed with HTTP status 500 Problem Id:System.Exception at Microsoft.Bot.ChannelConnector.BotAPI+d__31.MoveNext
The developers tool console shows this when I interact with the bot:
https://webchat.botframework.com/v3/directline/conversations/3NgflndFbpzCRDtnMdZpjf-g/activities 502 (Bad Gateway)
if you paste the above link in a browser this is what you will get:
{
"error": {
"code": "BadArgument",
"message": "Missing token or secret"
}
}
I am lost at this point. I can understand the problem but I don't know how to go forward. Am I supposed to add the messaging endpoint of my bot in my code somewhere?
A link to github repo of the code:here