title: SignalR 2.1.0: The connection has not been established
body: <p>I have a ASP.NET Web Application with a simple HTML page and some JavaScript to communicate via SignalR. That works fine.
  Now I'm trying to call a method on the Hub from another project (in the same solution) and by using the .NET Signalr Client Api:</p>
  
  <pre><code>        var connection = new HubConnection("http://localhost:32986/");
          var hub = connection.CreateHubProxy("MessageHub");
          connection.Start();
          hub.Invoke("SendMessage", "", "");
  </code></pre>
  
  <p>The last line causes <code>InvalidOperationException: The connection has not been established.</code> But I am able to connect to the hub from my JavaScript code.</p>
  
  <p>How can I connect to the Hub by using C# code?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The moment after writing this post, I tried to add <code>.Wait()</code> and it worked!
  So this will do:</p>
  
  <pre><code>        var connection = new HubConnection("http://localhost:32986/");
          var hub = connection.CreateHubProxy("MessageHub");
          connection.Start().Wait();
          hub.Invoke("SendMessage", "", "");
  </code></pre>