我有以下服务器代码:
var server = new Server("http://localhost:13170/");
server.MapConnection<EchoConnection>("echo");
server.Start();
但是当我从我的客户端代码连接到它时:
var connection = new Connection("http://localhost:13170/echo");
connection
.Start()
.ContinueWith(t =>
{
if (!t.IsFaulted)
connection.Send("Hello");
else
Console.WriteLine(t.Exception);
});
...它报告:
System.Net.WebException: The remote server returned an error: (404) Not Found.
我究竟做错了什么?