title: Send message to specific user in signalr
body: <p>I have a signalR Server(Console Application) and a client application(Asp.net MVC5)</p>
  
  <p>How I can send message to specific user in OAuth Membership.</p>
  
  <p>Actually I can't resolve sender user from hub request context with.</p>
  
  <pre class="lang-cs prettyprint-override"><code>Context.User.Identity.Name
  </code></pre>
  
  <p><strong>My Hub</strong></p>
  
  <pre class="lang-cs prettyprint-override"><code>public class UserHub : Hub
  {
  
      #region Hub Methods
      public void LoggedIn(string userName, string uniqueId, string ip)
      {
          Clients.All.userLoggedIn(userName, uniqueId, ip);
      }
      public void LoggedOut(string userName, string uniqueId, string ip)
      {
          var t = ClaimsPrincipal.Current.Identity.Name;
          Clients.All.userLoggedOut(userName, uniqueId, ip);
      }
      public void SendMessage(string sendFromId, string userId, string sendFromName, string userName, string message)
      {
          Clients.User(userName).sendMessage(sendFromId, userId, sendFromName, userName, message);
      }
      #endregion
  }
  </code></pre>
  
  <p><strong>Start hub class(Program.cs)</strong></p>
  
  <pre class="lang-cs prettyprint-override"><code>class Program
  {
      static void Main(string[] args)
      {
          string url = string.Format("http://localhost:{0}", ConfigurationManager.AppSettings["SignalRServerPort"]);
          using (WebApp.Start(url))
          {
              Console.WriteLine("Server running on {0}", url);
              Console.ReadLine();
          }
      }
  }
  </code></pre>