How to use SignalR in ASP.Net Core


is a new version of the library that enables you to implement real-time communications in ASP.Net Core applications. Here the term “real-time” means that the server application can push data or content to connected clients as soon as updates happen, without clients having to request them. You can learn more about SignalR from .

In this article we’ll look at how we can work with SignalR in ASP.Net Core. We’ll create a simple server that broadcasts text messages to clients, and a console application that consumes the messages. 

Create an ASP.Net Core project and install SignalR

First off, create a new ASP.Net Core project in Visual Studio. Assuming that you’re running Visual Studio Community Edition 2017 and .Net Core is already installed in your system, follow these steps to create an ASP.Net Core application.

  1. In Visual Studio, click on File > New > Project.
  2. Select “ASP.Net Core Web Application (.Net Core)” from the list of the templates displayed.
  3. Specify a name for the project and click OK to save it.
  4. In the “New .Net Core Web Application…” window, select “Web API.”
  5. Ensure that “Enable Docker Support” is unchecked and that “No Authentication” is selected as we won’t be using either here.
  6. Click OK.