O'Reilly logo

SignalR - Real-time Application Development - Second Edition by Einar Ingebrigtsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required