I followed the following QuickStart example from a brand new EmptyWebApplication:
https://github.com/SignalR/SignalR/wiki/QuickStart-Persistent-Connections
I installed using NuGet, added Global.asax, MyConnection.cs, and an EchoClient.aspx with exactly the code outlined in the tutorial (except for one difference, my classes are in namespace “SignalR1” – I don’t think it shoudl matter since it all compiles but I am noting it down anyway). However I get the following error when I run the application and hit the “broadcast” button:
SignalR: Connection must be started before data can be sent. Call .start() before .send()
I’m pretty sure .start() is being called before .send() because the code in the tutorial does so, and I’ve also stepped through the code to make sure its happening. I’m guessing for some reason the connection is not going through.
Any ideas? I’m also using the Visual Studio Development server (not sure if that matters, but also noting it down). Thanks!
David Fowler helped me on GitHub. The issue was my version of NuGet was old. Upgrading to the latest version of NuGet and using that to install SignalR fixed this.
See:
http://github.com/SignalR/SignalR/issues/288