In my previous post I explained how to create a simple Hello Bot project using Visual Studio 2015. Once we have created this bot (step 1), our next steps are:
- Create Hello Bot app using Visual Studio
- Publish the bot to Azure and register the bot in Microsoft Bot Framework
- Connect the bot to specific channels
So, let’s go with the Azure publish process. This is something very usual so I won’t get into the small step by step details (see the references section). You need an Azure subscription and then you can move on.
Select your project in Visual Studio 2015, get the context menu and select “Publish”.
This will start the Azure publish wizard. We’ll create an App Service. And for this demo I’ll name it “BotApplicationElBrunoTest”
So, the Visual Studio publish wizard will be started, and a couple of seconds later we’ll have our Bot App published into an Azure App Service.
At this moment is important to annotate the url of our service [http://botapplicationelbrunotest.azurewebsites.net/]
Now is moment to register our bot into the Microsoft Bot Framework.
We go to the “My Bots” section and we can register our new bot. Most of the fields are very descriptive, and we need to define and endpoint for our bot. This is our previous Azure URl with the /api/messages suffix.
And that’s it! Our bot is registered in the Bot Framework directory. By default the bot are enabled with a Webchat channel.
We can try this channel using the test feature in the bottom left of the page
However, is better to do this using the Microsoft Bot Emulator app. Once we add the correct url in the app, we can try something like this
Once we got the bot registered, we need to update the AppId and AppSecret values on the web.config file in Visual Studio. After we update this values, we need to publish again to Azure our project and that’s it!
So, we only need to add one more Step, that’ will be the latest post for this series 😀
Greetings @ Toronto