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