title: SignalR push notifications to all browser instances of single authenticated user
body: <p>I'm working on an application that needs to notify the user when they receive a new notification.  The application will be hosted on Azure and will be .NET MVC 3 (probably not important, but FYI). I also </p>
  
  <p>Notifications are saved in an MSSQL db (2008) and have an <code>IsRead</code> field. Notifications are generated from various user and server actions.  Based on user preferences, some notifications will be created with <code>IsRead == false</code>.</p>
  
  <p>I have 2 different scenarios that I feel that SignalR will be perfect in handling, I just need a little guidance:</p>
  
  <ol>
  <li>User has several windows open browsing the site and a new notification row is added, assigned to that user, with <code>IsRead == true</code>
  <ul>
  <li>I would like all the specific user's browser instances to have a specific js function called to reveal a notification pop up</li>
  </ul></li>
  <li>User has several windows open and clicks on the notification pop up.
  <ul>
  <li>I would like all the specific user's browser instances to have a specific js function called to remove the notification pop up. (Only the specific browser instance that handled the click will also execute a js function to show the notification details)</li>
  </ul></li>
  </ol>
  
  <h1>What I've tried</h1>
  
  <hr>
  
  <p>For the first scenario, I think that the same action that causes the notification to be written to the database will have the responsibility of notifying all the user's browser instances.</p>
  
  <p>The second scenario would be similar in that by clicking on the pop up, a server endpoint would be called via Ajax and that endpoint would update the db to mark the notification as read, and then notify all the other user's browser instances.</p>
  
  <p>If there is a way to keep track of SignalR Clients based on ASP.NET Forms Authentication Username, then I think that will work in solving the problems in both scenarios.  </p>
  
  <h1>TL;DR</h1>
  
  <hr>
  
  <p>My main problem is that I don't know how to signal all of one specific user's browser instances using SignalR.  I was thinking about making a group based on the ASP.NET Forms Authentication Username.  Would this work?  Is there an easier way that is built into SignalR that handles this?</p>