我想使用 SignalR .Net 客户端连接到聊天中心(Scott 聊天示例中的代码),但不确定如何正确操作。
我使用了以下代码,但无法连接。调用 connection.Start() 后,没有返回连接 ID。
var connection = new HubConnection("http://localhost:1065/");
var myHub = connection.CreateProxy("Mvc3SignalR.Models.Chat");
connection.Start();
链接到 Scott 的聊天示例http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx