简体   繁体   English

SignalR地图集线器

[英]SignalR map hubs

I am using SignalR to build Real time application I have added the following code to application start in the global.asax file 我正在使用SignalR构建实时应用程序,我在global.asax文件中向应用程序启动添加了以下代码

'Register the default hubs route: ~/signalr
 RouteTable.Routes.MapHubs()

and I got the following error: 我收到以下错误:

A route named 'signalr.hubs' is already in the route collection. 名为“ signalr.hubs”的路由已在路由集合中。 Route names must be unique. 路由名称必须唯一。 Parameter name: name 参数名称:名称

It's most likely you are calling this twice. 您很可能两次打来电话。 Check all your code that this is not the case, including any App_Start code. 检查所有代码(包括任何App_Start代码)是否不是这种情况。 Do a global search within your app for "MapHubs". 在您的应用程序中对“ MapHubs”进行全局搜索。

Also check you have only one version of Signal installed (older versions had a different namespace). 还要检查您是否仅安装了一个Signal版本(较旧的版本具有不同的名称空间)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM