1
votes

As per the documentation, after testing the bot locally, I published the bot on the Azure bot Service. But the Test in Web chat on portal is not working even after deleting the fileSecrets from app setting as per instructions.

I have .net solution and project and I tried to publish from both solution folder and project folder using AzureCLI. But still unable to get the chat working on portal. I looked at the Audit logs and there are no errors and it actually shows successful deployment.

Where can I look for some more information to troubleshoot and fix the issue?

I am using Bot Framework SDK V4. I am following these instruction on Azure Bot Service documentation page to test the Bot deployment. I have done this twice and gone over each steps and read them carefully. Is there currently some bug in the Azure Bot Service that is preventing deployment from local environment?

If I create a Bot Service from portal ... everything works. I was able to download the .net based bot source code locally and was able to run it locally and was also able to point to production endpoint using Emulator. Everything worked fine.

But Bot created using Azure CLI doesn't work when I publish it.
My Azure CLI : V 2.0.54

1
Have you checked to make sure that your bot file has a production endpoint along with a development endpoint?tdurnford
Well, if I am supposed to know this then that information is completely missing in the documentation link. Sorry, I am not yet familiar with .bot file structure and just going through the documentation flow as part of my learning process. I typically don't jump around and trust that if I follow the documented step it should give me the result as stated. But I am finding out that many documentation is not up-to-date or missing critical info. This documentation sucks :( !Andy

1 Answers

0
votes

Assuming you've either started from a sample or used the VSIX/dotnet new templates, the Startup.cs is going to contain logic to attempt to load endpoint credentials from the .bot file. When you are deploying into Azure you need to make sure you've added an endpoint to the .bot file named "production" and make sure that endpoint is configured with your bot's appId and appPassword.

You mentioned you followed the deployment docs and this would have happened during this step in those docs where you download the .bot file that was created during creation of the web app bot. One of this things not mentioned in this doc, unfortunately, is that if you clear the encryption from the downloaded .bot file then you also need to clear the botFileSecret appSetting in the portal or, if you re-encrypted you need to update the botFileSecret appSetting to the new secret.

As for diagnosing start-up problems like this, the "easiest" thing to do is enable Application Logging on the Azure Web App, reset the web application and then, with the Log Streaming blade in the portal, start a conversation with the bot and see what exception details are written to the log stream.