SignalR/SignalR — pull request #2921 by alfeg (2014-03-07 21:34:09+00:00)
Title: Fix for SB scale-out first connection error "The stream is not open"

Proposed fix for #2767

I'm were able to reproduce #2767 locally using local install of Azure ServiceBus, with the help of simple code snippet inserted in Microsoft.AspNet.SelfHost.Samples:
``` csharp
// proper connection string can be obtained using powershell
// Get-SBAuthorizationRule -NamespaceName appNamespace
var uri = "Endpoint=sb://localhost/appNamespace;StsEndpoint=https://localhost:9355/appNamespace;RuntimePort=9354;ManagementPort=9355";
GlobalHost.DependencyResolver.UseServiceBus(uri, "YourAppName");

using (WebApp.Start("http://localhost:8080"))
{
Console.WriteLine("Server running at http://localhost:8080/");

var hub = new HubConnection("http://localhost:8080");
var proxy = hub.CreateHubProxy("chat");

Console.WriteLine("Opening connection");
hub.Start().Wait();
Console.WriteLine("Sending data");
proxy.Invoke("Send", "Data").Wait();
Console.WriteLine("Data sended");
hub.Stop();
}
```
I were not able to create a proper unit test for this issue.