Articles → MICROSOFT BOT FRAMEWORK → Deploy Microsoft Bot In Azure
Deploy Microsoft Bot In Azure
Download The Bot
- Go to the bot.
- Click on the "Build" option.
Click to Enlarge
- A window will be opened on the right-hand side. Click on the button "Download Bot source code".
Click to Enlarge
- The bot source code is downloaded as a zip file.
- Extract the code and open the code using visual studio.
Make Changes In The Bot
- Open the visual studio in the admin mode. Open the solution.
- Open the file "EchoBot.cs" inside the "Bot" folder.
- Change the message inside the "OnMembersAddedAsync" function.
Click to Enlarge
- Rebuild the solution.
Download The Publish Profile File
- In the details of the bot, go to the "All App service settings" menu option.
Click to Enlarge
- On the right-hand side window, click on the "Get Publish profile" button.
Click to Enlarge
- A file with the extension ".PublishSettings" will be downloaded. This file is the XML file that contains the Publish profile information.
Deploy The Code On Azure
- Open visual studio in the admin mode.
- Open bot project.
- Rebuild the project.
- Right-click on the project in the solution explorer of the visual studio and click on the "Publish.." option.
Click to Enlarge
- The publish window will open in the visual studio.
- A popup window will appear.
Click to Enlarge
- Click on the "Import Profile…" button and select the publish profile setting file that we have downloaded in the last section.
- The profile is imported.
Click to Enlarge
- From the dropdown, select web deploy instead of FTP.
Click to Enlarge
- Click on the "Edit" link. A popup window will appear.
- Go to the "Settings" tab and check the checkbox "Remove additional files at destination".
Click to Enlarge
- Click on the "Save" button to close the window.
- Finally, click on the "Publish" button.
- Once the publish is completed, a browser window will appear for the confirmation.
Click to Enlarge
Test The Deployed Changes
- Open the bot in the azure portal.
- Go to "Test in Web Chat".
Click to Enlarge