Simple implementation of Bot framework

Source: Internet
Author: User

Recently, Microsoft released the bot Framework, looked up some information, and then tried to write a piece of code. To make it easier to develop, someone has already done a bot framework development template, please download here. After the download is complete, copy the bot application.zip to "%userprofile%\documents\visual Studio 2015\templates\projecttemplates\visual C #", as


Then open VS2015, here in the C # project can find the bot application template, click Create.


Then locate the MessagesController.cs in the Controllers folder and remove the "botauthentication" above it to omit validation when initiating the request.


Open Web. config, populate AppID and Appsecret, and these two values can use GUIDs.


Publish the project to a local IIS, and configure a port, such as 20080.



Use the Ngrok tool to expose the local site to the external network.


See that the local 20080 ports are already configured on Http://1aea0e3a.ngrok.io and Https://1aea0e3a.ngrok.io. Here, you can access the local website by visiting the URL directly. This approach can also be used in development.

With this URL, we can register a bot.

Log in to https://dev.botframework.com and click Get start to register.


Registration requires a Microsoft account to log in and then agree to authorize. Fill in the relevant information into the interface,


After completing the completion, save, then the creation of our own bot, such as



Click Edit to enter, set app secret


There is a Send page on the page that has just registered bot success and can initiate a request such as


You can see the feedback received, and you can see the status in Ngrok.


Because the URL generated by the Ngrok will expire for a period of time or unused, it needs to be re-generated and then configured in the bot.

In the bot interface, there is a get bot embed codes Click, you can get embedded code. Such as.


The above reference http://www.c-sharpcorner.com/article/creating-a-simple-bot-application-using-microsoft-bot-framew/

Reprint please indicate the source.




Simple implementation of Bot framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.