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

HTTP handler config

In order for the user to be authenticated, we need something we can call on the server to do the authentication. We could have gone with a hub for that purpose, or even a persistent connection. However, it would lead to some interesting configuration and having to disconnect from SignalR, when we were authenticated, and then having to reconnect. So instead, we can do something in the simplest possible way.

In order to be able to log in from our login page that we will be creating, we will be using an HTTP handler for authenticating and giving us the authentication cookie for any subsequent requests. We'll create the handler shortly. However, for now, let's just configure it to allow requests even if we're not logged in:

  1. Add the ...

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