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

Authentication

Now that we have the configuration in place for securing our site properly, we want to be able to actually log into the site:

  1. Let's add the security handler that we just configured. Right-click on the web project and navigate to Add | New item. Select Web and then select Generic Handler. Give it the name SecurityHandler.ashx:
    Authentication
  2. We will, for simplicity, be hardcoding our users, passwords, and roles. At the top of the SecurityHandler.ashx file, add the following:
    Dictionary<string, string> _usersAndPassword = new Dictionary<string, string> { { "SomeCreator", "1234" }, { "SomeChatter", "1234" } }; Dictionary<string, string[]> _usersAndRoles ...

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