The great finale

Now, the final piece of the puzzle. SignalR uses the underlying credential information found on threads in .NET. This means we will have to populate this information based on the cookie generated by our security handler. For this, we're going to need Global Application Class. Right-click on the web project and navigate to Add | New item. Select Web and then select Generic Handler. Give it the name Global.asax:

The great finale
  1. If the request coming in is authenticated, we want to get the cookie and decrypt it. From this, we want to put the identity into the HttpContext. Open the Global.asax.cs file and make the Application_AuthenticateRequest method ...

Get SignalR - Real-time Application Development - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.