Deploying via Visual Studio
The basics of that tutorial are fine, despite being super out-of-date and not an official tutorial/doc. Since you downloaded your bot from Azure, the only thing you need to do Publish is:
- Right-click your Project in Visual Studio, Select Publish
- Click New
- App Service > Select Existing
- Select Your App Service
- Hit OK and it will Publish
Deploying via Azure CLI
Follow the Deployment Docs
Troubleshooting Your Deployment
Honestly, when a deployment fails, I find it best to start a new deployment from scratch, ensuring that I follow each step exactly. This is often quicker than trying to troubleshoot and fix a failed deployment. That being said, here's what's likely wrong with each issue you mentioned:
I expected the original Web App Bot's behavior to update but when I tested in Web Chat it still the default bot with the flight booking example
Possible issues:
- The deployment wasn't actually successful
- You deployed to the wrong Resource Group
Ensure you're on the latest Azure CLI and try again.
Sometimes, if you're publishing via Visual Studio, you right-click the Project, select Publish, edit, Settings, then under "File Publish Options", check "Remove additional files at destination". Note, this is likely not the issue you're having as you're using a newer bot.
When I typed a message in Test in Web Chat for the Bot Channels Registration resource I get "couldn't send retry" and "There was an error sending this message to your bot. HTTP status code: not found"
This usually means that the endpoint is wrong. In your Web App Bot > Settings, ensure the Messaging Endpoint is:
https://<yourAppService>.azurewebsites.net/api/messages
I answered a similar question where the user tried to deploy via AZ CLI and they were missing this step:
az bot prepare-deploy --lang Csharp --code-dir "." --proj-file-path "MyBot.csproj"
I have tried changing the Microsoft App ID and password and messaging endpoint to match the ones I have used when I tested locally.
The correct MicrosoftAppId and MicrosoftAppPassword are found in your app in the App Registration Panel. If you need a new MicrosoftAppPassword, open your App Registration, go to Certificates and secrets, and click New Client Secret. Be sure to copy it, because if you leave the page, you cannot view it again.
These need to be set in three places:
- The
appsettings.json file (or .env for Node).
- Azure Portal > Resource Group > App Service > Configuration
- In Emulator when testing