title: Unable to send message to SignalR client in Azure after redeploy
body: <p>I have made a few simple modifications to the <a href="https://github.com/SignalR/Samples/tree/master/BasicChat.Mvc" rel="nofollow">MVC-Chat Sample application</a> and have deployed it to Azure running on 2 webworker-instances. Clients can only talk to other clients on the same instance, but that will be solved by using a backplane later.</p>
  
  <p>When I deploy new code to the server (from visual studio), the instances will be upgraded one by one, and all clients will be reconnected first to instance 2 (while instance 1 gets the new code), and then all clients will reconnected to instance 1 while instance 2 is upgraded. (I am not actually changing any code, only re-deploying).</p>
  
  <p>The problem is: After the clients have reconnected, some of them will not be able to receive messages sent to them, but they will receive broadcasts.</p>
  
  <p>Here is my hub code:</p>
  
  <pre><code>public class ChatHub : Hub
  {
      private string GetRoleId()
      {
          return RoleEnvironment.CurrentRoleInstance.Id;
      }
  
      public override Task OnConnected()
      {
          string message = String.Format("OnConnected ({0}) {1} - Version: {2}", GetRoleId(), Context.ConnectionId, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version);
          Clients.All.newMessage(message);
          return base.OnConnected();
      }
  
      public override Task OnDisconnected()
      {
          Clients.All.newMessage(String.Format("OnDisconnected ({0}) {1} - Version: {2}", GetRoleId(), Context.ConnectionId, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version));
          return base.OnDisconnected();
      }
  
      public override Task OnReconnected()
      {
          Clients.All.newMessage(String.Format("OnReconnected ({0}) {1} - Version: {2}", GetRoleId(), Context.ConnectionId, System.Reflection.Assembly.GetExecutingAssembly().GetName().Version));
          return base.OnReconnected();
      }
  
      public void SendToConnection(string connectionId, string message)
      {
          Clients.Client(connectionId).newMessage(message);
      }
  }
  </code></pre>
  
  <p>My Index.cshtml file is also very simple and has few modifications:</p>
  
  <pre><code>@{
      ViewBag.Title = "Index";
  }
  &lt;script src="~/Scripts/jquery-1.8.2.js"&gt;&lt;/script&gt;
  &lt;script src="~/Scripts/jquery.signalR-1.1.3.js"&gt;&lt;/script&gt;
  &lt;script src="~/signalr/hubs"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(function () {
      var addMessage = function(message) {
          var time = new Date();
          $('#info').prepend('&lt;li&gt;' + time.toUTCString() + ' - ' + message + '&lt;/li&gt;');
      };
  
      var chat = $.connection.chatHub;
  
      chat.client.newMessage = function (message) {
          addMessage('Incomming message: ' + $.connection.hub.transport.name + ' - ' + message);
      };
  
      var start = function () {
          $.connection.hub.logging = true;
          addMessage('Before start');
          $.connection.hub.start().done(function () {
              addMessage('After start');
          });
      };
  
      $.connection.hub.stateChanged(function (state) {
          addMessage('State changed (' + state.newState + '). ID: &lt;b&gt;' + $.connection.hub.id + '&lt;/b&gt;&lt;/li&gt;');
      });
      start();
  });
  
  &lt;/script&gt;
  
  &lt;div id="info"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>To send a private message in the browser (I use Chrome) to yourself, type this in the developer console:</p>
  
  <pre><code>$.connection.chatHub.server.sendToConnection($.connection.hub.id, '&lt;b&gt;Hey!&lt;/b&gt;')
  </code></pre>
  
  <p>The "hey" will not appear in about 5-15% of the browsers.</p>
  
  <p>This is what is showing on the javascript console window when a browser that gets "blinded" is reconnected to a server:</p>
  
  <pre><code>[15:25:08 GMT+0200 (W. Europe Daylight Time)] SignalR: Keep alive has been missed, connection may be dead/slow. jquery.signalR-1.1.3.js:54
  [15:25:14 GMT+0200 (W. Europe Daylight Time)] SignalR: Keep alive timed out.  Notifying transport that connection has been lost. jquery.signalR-1.1.3.js:54
  [15:25:16 GMT+0200 (W. Europe Daylight Time)] SignalR: Closing the Websocket jquery.signalR-1.1.3.js:54
  [15:25:16 GMT+0200 (W. Europe Daylight Time)] SignalR: Clearing hub invocation callbacks with error: Connection started reconnecting before invocation result was received. jquery.signalR-1.1.3.js:54
  [15:25:16 GMT+0200 (W. Europe Daylight Time)] SignalR: webSockets reconnecting jquery.signalR-1.1.3.js:54
  [15:25:16 GMT+0200 (W. Europe Daylight Time)] SignalR: Connecting to websocket endpoint 'ws://myappname.cloudapp.net/signalr/reconnect?transport=webSockets&amp;connectionToken=z-aUiXxW_jcBHDi631xCvrrQLoMtK0jVl3l-dRYcESU01cvkgDzwPfc8GlHk2P9zlmp-4GLwxLYdKzdUJi-vahn0qOGlEnc2Z85p8ecDT1fgTBLI0&amp;connectionData=%5B%7B%22name%22%3A%22chathub%22%7D%5D&amp;messageId=B%2C14&amp;tid=3' jquery.signalR-1.1.3.js:54
  [15:25:25 GMT+0200 (W. Europe Daylight Time)] SignalR: Websocket opened jquery.signalR-1.1.3.js:54
  [15:25:25 GMT+0200 (W. Europe Daylight Time)] SignalR: Triggering client hub event 'newMessage' on hub 'ChatHub'. jquery.signalR-1.1.3.js:54
  [15:25:25 GMT+0200 (W. Europe Daylight Time)] SignalR: Triggering client hub event 'newMessage' on hub 'ChatHub'. jquery.signalR-1.1.3.js:54
  
  &gt; $.connection.chatHub.server.sendToConnection($.connection.hub.id, '&lt;b&gt;Hey!&lt;/b&gt;')
  Object {state: function, always: function, then: function, promise: function, pipe: function…}
  </code></pre>
  
  <p>Any help on solving this bug would be appreciated. </p>