Search code examples
azuredebuggingbotframeworkdiagnostics

How do I use the DialogPromptBot sample on Azure?


I started with the bot sample from Azure. However, it seemed to be out of date (.Net Core mismatches). So I switched to DialogPromptBot sample as my starting place. I made the changes to the sample code to make it do what I want on my local machine but I can't get it up and running on Azure. I tried deploying from GitHub but all it did was plaster the DialogPromptBot derived bot on top of the existing bot and the resulting mess does not run. It just sits at "Waiting for bot to be ready" when I click on Test in Web Chat. I want to use the WaterfallDialog because I have a series of questions.

Is there a way to deploy a bot from scratch? I tried publishing from VS. It claimed to publish, however, I got the following error:

An error occurred while starting the application.

.NET Core 4.6.26614.01 X86 v4.0.0.0 | Microsoft.AspNetCore.Hosting version 2.1.1-rtm-30846 | Microsoft Windows 10.0.14393 | Need help?

The App Service shows up but not the bot.

Note: I'm running Visual Studio for Mac.

Update: I started over with a clean sample from Azure. Made sure I matched the versions of libraries with the ones in the sample and now everything works. The desktop Bot Emulator, the Web Chat and Skype all look very different.


Solution

  • It sounds like something went sideways during your deployment. You can publish an app (or bot in this case) straight from Visual Studio for Mac using this tutorial.

    Both the Mac and Windows versions will publish bots just the same: as a web app. Typically, a bot is published as a web app BOT, but if you publish straight from Visual Studio the only option is as a plain web app. No worries!

    After the web app is published, you'll go into Azure and create a Bot Channels Registration in the same resource as your newly published app. Then you'll add the app ID and password from the bot channels registration to your web app (the actual bot portion) and you should be good to test in webchat.

    The explicit steps are here. You can skip over the first part about using Visual Studio, since you'll have to follow the Mac version above.

    Knowing that your deployment borked, I would honestly scrap it, and start over with a fresh deployment, following the above instructions.