This is the Microsoft Official SIGNALR 2.0 tutorial Getting Started with ASP.net signalr 2.0 series translation, this is the fourth article: starts to use SIGNALR 2.0
Original: Getting Started with SIGNALR 2.0
PS. The previous article upgraded from SignalR1.0 to 2.0 skipped ... Only a few steps, interested students can go to see for themselves.
Overview
This tutorial shows you how to use SignalR2.0 to build a browser-based chat room program. You will add the SIGNALR library to an empty asp.net Web application, create a hub (Hubs) class for sending messages to the client, and create an HTML page where users can send and receive chat messages on the page. For how to create a chat room in a MVC5 environment, see Getting Started with SIGNALR 2.0 and MVC 5.
SIGNALR is an open-source. NET Library for building Web applications that require real-time user interaction or real-time data updates. such as social applications, multi-user online games, business collaboration, news, weather, finance or update applications. These are often used as real-time applications.
SIGNALR simplifies the process of building real-time applications. It includes a ASP.net server library and a JavaScript client library that makes it easier to manage client to server-side connections and push content updates to clients. You can add the SIGNALR library to an existing ASP.net application for real-time functionality.
This tutorial will demonstrate the following SIGNALR development tasks:
Add signalr library to asp.net Web application
Set up a hub class to push updates to the client
Build one. NET open Web Interface (Owin) startup class to configure the application
Use the SIGNALR jquery library to send and display update messages in a Web page
The following screenshot shows the chat application running in the browser, and every new user who joins the chat room is free to speak.
Set up the project
This section explains how to create a chat room by using the VS2013 and SIGNALR 2.0 libraries to create an empty ASP.net Web reference program and add SIGNALR to it.
1. Create a new Web application in VS2013.