1
我试图在现有的使用Ninject for DI的ASP.Net MVC 4项目中设置SignalR,但每当我尝试访问SignalR默认路由(我已确认在路由表),我得到下面的异常抛出:SignalR和Ninject - Ninject没有返回路由控制器
Exception message: The IControllerFactory 'Infrastructure.NinjectControllerFactory' did not return a controller for the name 'signalr'.
我已经尝试通过注射Ninject内核到SignalR:
GlobalHost.DependencyResolver = new NinjectSignalRDependencyResolver(ninjectKernel);
而且我通过设置缺省路由:
RouteTable.Routes.MapHubs();
在Global.asax中的Application_Start
我似乎无法找到任何方式来解决这个问题。