【发布时间】:2014-02-06 20:56:47
【问题描述】:
从这里询问我已经知道我可以在一个普通的旧 Windows 服务中使用 SignalR。我想在作为 SignalR 客户端的 Windows 服务和 ASP.NET MVC SignalR 服务器之间进行通信。我用this hubs guide,它说
指定 URL 的服务器代码
app.MapSignalR("/signalr", new HubConfiguration());
如果我这样做,消息会去哪里?新建 HubConfiguration 时的 hub 是什么?
它说我可以连接
NET client code that specifies the URL
var hubConnection = new HubConnection("http://contoso.com/signalr", useDefaultUrl: false);
我将在我的 Windows Server 中拥有它,但如果我将文本发送到服务器上的 http://myserver.com/signalr,我该如何获取它?什么枢纽?
此外,最好将它放在 Windows 服务中的哪个位置?举个例子就好了!
【问题讨论】:
标签: asp.net-mvc windows-services signalr