Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何通过浏览器访问 Signalr Hub?我在其中创建了名为“testhub”(使用HubName属性)和方法“Hello”的集线器,所以我想像这样访问它:http://serverurl/signalr/testhub/Hello
HubName
http://serverurl/signalr/testhub/Hello
SignalR 是一个实时消息传递框架,因此首先使用几个更高级别的协议之一通过 HTTP(最好是 WebSockets,最坏情况是长轮询)建立连接,然后通过传递 JSON 格式的消息来调用 Hub 方法本身。级协议。
您描述的示例似乎您期待一个请求/响应模型,为此您最好使用基于 REST 的技术,如 ASP.NET MVC 或 ASP.NET Web API。