I would like to follow Azure best practices and utilize deployment slots for testing my chat bot. I have deployed 2 instances of my bot.
Production bot: https://[my-bot].azurewebsites.net
Staging bot: https://[my-bot-staging].azurewebsites.net
I have a DirectLine app that can successfully connect to my production bot, but do not know how to connect it to the staging instance.
The latest StackOverflow questions on this topic are old. The accepted answer here claims that you need 2 physical bots instead of using deployment slots: Setting up slots or multiple environments for Azure Bot Service
Is this still the case in 2018? How can I connect DirectLine to a staging slot?
I have a DirectLine app that can successfully connect to my production bot, but do not know how to connect it to the staging instance.
If you want your DirectLine app works with same bot service and connect it to your bot application hosting on staging slot, you can clone configuration for your staging slot from that existing production slot, and then replace Messaging endpoint with your staging bot application endpoint on your bot service Settings blade.
Besides, you can also create a Bot Channels Registration bot service to connect your bot application hosting on staging slot to other channels.
Please ensure that you provide/set settings for MicrosoftAppId and MicrosoftAppPassword of your bot app hosting on staging slot with Microsoft App ID and password of the corresponding Microsoft App that is created when you create Bot Channels Registration.
Test result: