Simple implementation of the Bot Framework

Source: Internet
Author: User

Simple implementation of the Bot Framework

Recently, Microsoft released the Bot Framework. After checking some information, it tried to write a piece of code. To facilitate development, someone has created a development template for the Bot Framework. You can download it by yourself. After the download is complete, copy Bot Application.zip to "% USERPROFILE % \ Documents \ Visual Studio 2015 \ Templates \ ProjectTemplates \ Visual C #", as shown in

Open VS2015. In the C # project, you can find the template of the Bot Application and click Create.

Find MessagesController. cs in the Controllers folder, and delete "BotAuthentication" above it to skip the verification during request initiation.

Open web. config and fill in AppId and AppSecret. The guid can be used for these two values.

Publish the project to the local IIS and configure a port, for example, 20080.

Use the ngrok tool to expose the local site to the Internet.

You can see that the local port 20080 has been configured on the http://1aea0e3a.ngrok.io and https://1aea0e3a.ngrok.io. You can access the local website directly. This method can also be used in development.

With this URL, we can register a bot.

Log on to https://dev.botframework.com and click Get Start to register.

When registering, you must have a Microsoft account to log on and then agree to the authorization. Enter relevant information in the interface,

After filling in the information, save and generate your own Bot, as shown in figure

 

Click Edit to enter and set app secret

A Send page is displayed on the page after the successful registration of the Bot, which can initiate a request, as shown in figure

You can see that you have received feedback, and you can also see the status in ngrok.

Because the web site generated by ngrok is invalid after a period of time or is not used, it needs to be generated again and then configured to the bot.

On the Bot interface, you can click Get bot embed codes to obtain the embedded code. For example.

Related Article

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.