
SignalR on .NET 5 enables persistent two-way client–server communication using the WebSocket protocol, with broad client support for chat apps and IoT devices and easy configuration and scaling.
Explore how SignalR uses three transport mechanisms—WebSocket, service events, and long polling—to enable hub and client communication that feels like remote procedure calls.
Configure a .NET 5 SignalR solution by creating an ASP.NET Core web app, adding a learning hub class inheriting from hub, and mapping the hub endpoint in Startup for training.
Explore how the SignalR hub acts as the central server class, enabling callable methods, broadcasting to all clients, using groups, and configuring endpoints with map hub in startup.
Explore how a SignalR hub routes messages to all clients, the caller, and groups, including adding and removing users from groups, and handling connected and disconnected events on the server.
Discover how strongly typed hubs in SignalR replace string method names with a client interface, enabling dot followed by the method name and preventing typos in receive message calls.
Explore how SignalR clients connect to hubs across dotnet, JavaScript, and Blazor, with strong typing to prevent method errors. Focus on dotnet and JavaScript clients.
Prepare the solution for the Signaler JavaScript client by installing the library via Visual Studio or online tools, select specific files from Microsoft/signaler/latest, and add the client code.
Learn to build a JavaScript signalR client on a simple HTML page, wiring controls to hub methods for broadcast, self, others, and group messages, with connection setup and error logging.
Create a basic console app to demonstrate a bare bones signaler client in dot net, set the target framework to .NET 5.0, and add the signaler client package.
Connect to a SignalR hub using a dotnet client, choose a transport (default WebSocket), and map a receive message handler to handle and log incoming messages across multiple clients.
Prepare a Blazor WebAssembly client for a .NET 5 SignalR app by adding, configuring, and referencing a Blazor client project with the proper NuGet package.
Explore how a web assembly client runs in the browser using razor components and HTML, and connect to a signalr hub to broadcast messages to all clients.
SignalR wraps WebSocket and other protocols, letting WebSocket clients connect to a SignalR server. Learn why to connect multiple clients, or build a client when language support is missing.
Discover how a .NET console client uses SignalR to simplify WebSocket communication, perform a handshake, receive messages in byte chunks, and broadcast from a Learning Hub.
Secure your SignalR hub in production by applying startup and core controller security configurations. Explore fundamental security practices to protect SignalR hubs in production.
learn how to configure cors in a SignalR on .NET 5 app by defining origin rules, methods, and credentials, using services.AddCors in startup and applying policies to control access.
Configure user authentication by scaffolding identity to create a database schema for users and roles, then enable authentication in the pipeline and run migrations to update the database.
Explore how identity authentication and authorization in .NET 5 govern access to SignalR hubs, endpoints, and methods using [Authorize], roles, and the startup configuration.
Register and log in users, enforce password rules, and configure lockout and cookies in a .NET 5 SignalR app. See how authorization attributes control access to messaging and admin actions.
Learn how to send messages to individual users using SignalR on .NET 5 by adding authenticated users to a username-named group and sending messages to the specified user.
Scale out a SignalR web app by configuring built-in features to support millions of users and persistent connections across multiple instances, using a load balancer and startup class configuration.
Learn how Radice backplane enables SignalR on .NET 5 to share connections across multiple app instances, enabling cloud scaling and cross-instance client communication.
Install the SignalR Redis package, configure services with the Redis address (localhost:6380), and run the app to route SignalR calls through Redis, enabling scaling of the hub.
Scale out by running two web apps that share the same SignalR hub, using a class library for the hub and removing authorization to simulate distributed deployment.
Learn how multiple scaled-out web applications share a single SignalR hub via a backplane, and how to use IHubContext with dependency injection to send messages from outside the hub.
Add a reference to our Hubs project and install the latest Microsoft.Azure.SignalR package in Visual Studio to enable your distributed web application to use the Azure resource.
Scale out a SignalR hub with Azure SignalR service using a backplane, configure services with endpoint and access key, and post requests to the service API and keep clients unchanged.
You have completed the SignalR course and can use SignalR in your own environment to solve problems, with core guidance and a WebSocket example.
Are you a web developer or do you write IoT software? If so, you would know that many web and IoT development projects these days require the ability to establish a persistent connection between a client and a server without having to keep sending repeated requests from the client. As you may also know, such functionality may be hard to implement.
However, if you can build your server-side application on ASP.NET Core, there is a way to make this whole process easy. There is a library called SignalR. This is what I'm going to talk about in this course. As well as doing all the heavy lifting for you, the library abstracts away all complex implementation details, so your code can be made extremely simple.
However, as you would already know, nothing in programming is simple in absolute terms. Programming is a complex activity, so even those concepts that are relatively simple require some practice and studying.
This is why I've created this course. By the end of it, you should be able to build a web application that clients will be able to establish a persistent connection with and exchange the data with in real time.
This is the second SignalR course that I have published. The previous one was about using SignalR on .NET Core 2.2. However, quite a lot has changes since then. .NET 5 has since been released and SignalR has also received several updates. So, this is an updated version of the course. The second edition.