title: OnConnected not firing when deployed despite correct client binding
body: <p>I've scoured the site, coming across <a href="https://stackoverflow.com/questions/13799160/signalr-onconnected-and-ondisconnected-not-firing">SignalR OnConnected and OnDisconnected not firing</a> and similar, but the solution does not apply in my case.  I <em>already do</em> have the client methods registered.</p>
  
  <p>Additionally, the OnConnected method of my hub <em>does</em> fire when running on my local box.  It simply does <em>not</em> fire when deployed.  All other methods work fine, however.  For the present, I've created a work-around as such:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;script&gt;
      $(function () {
          var myHub = $.connection.myHub;
          myHub.client.clientMessage = function (message) { alert(message); };
  
          // Start the connection.
          $.connection.hub.start().done(function () {
              myHub.server.superfluousMethodToDoSameThingInOnConnect();
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I would really like to stop using this second call, however, and simply have <code>OnConnected</code> work properly as it should. What is necessary on my deployment server to have it work the same?</p>
  
  <p>For reference, my SignalR is version 1.2.2 (limited to .NET 4.0, for now) incorporated into an MVC site (with no errors, otherwise).
  My dev box is Windows 7 hosting in IIS Express 8.5
  The deployment box is Winows Server 2003 hosting in IIS V6.0.</p>
  
  <p><strong>Edit 1:</strong> I've included a</p>
  
  <pre class="lang-js prettyprint-override"><code>myHub.connection.stateChanged(function (change) { alert("State: " + change.newState); });
  </code></pre>
  
  <p>for debugging, and when the page loads, it displays popup of "State: 0" followed by a popup of "State: 1" a short time later, and a "State: 4" when I leave the page, so it looks like my connection itself is behaving correctly. This functions the same both locally and on the deploy server.</p>
  
  <p><strong>Edit 2:</strong> To test further, I have updated the methods in the hub as below:</p>
  
  <pre><code>public override Task OnConnected()
  {
      Groups.Add(Context.ConnectionId, Context.User.Identity.Name);
      Clients.All.clientMessage("OnConnected:: ID: " + Context.ConnectionId + " USER: " + Context.User.Identity.Name);
      return base.OnConnected();
  }
  
  public void SuperfluousMethodToDoSameThingInOnConnect()
  {
      Clients.All.clientMessage("SuperfluousMethodToDoSameThingInOnConnect:: ID: " + Context.ConnectionId + " USER: " + Context.User.Identity.Name);
  }
  </code></pre>
  
  <p>Results of this testing show that only the text sent from <code>SuperfluousMethodToDoSameThingInOnConnect</code> is shown back to the Caller.  However, other clients (tested in other browser windows) see both the text from <code>OnConnected</code> and <code>SuperfluousMethodToDoSameThingInOnConnect</code>.</p>
  
  <p>Additionally, when I try to send a message back to the caller using <code>Context.Groups(Context.User.Identity.Name)</code> then the message is not sent.  However, if I move the group registration line <code>Groups.Add(Context.ConnectionId, Context.User.Identity.Name)</code> from <code>OnConnected</code> into <code>SuperfluousMethodToDoSameThingInOnConnect</code>, then messages <em>can</em> be sent using <code>Groups.Add(Context.ConnectionId, Context.User.Identity.Name)</code>. This seems extremely bizarre, as I can see that the <code>OnConnected</code> method is called, but the Group is not really registered?</p>
  
  <p>Really at a loss for anything to explain this erratic behavior.</p>
  
  <p><strong>Edit 3:</strong> Pushed the web app out to a Windows Server 2012 VM, where I found it works correctly, same as my local dev box. Is it that SignalR does not fully work on IIS 6?</p>