SignalR "signalr/hubs" giving 404 error SignalR "signalr/hubs" giving 404 error asp.net asp.net

SignalR "signalr/hubs" giving 404 error


Try call RouteTable.Routes.MapHubs() before RouteConfig.RegisterRoutes(RouteTable.Routes) in Global.asax.cs if you use MVC 4. It works for me.

        RouteTable.Routes.MapHubs();        RouteConfig.RegisterRoutes(RouteTable.Routes);


It could be that you haven't added a reference to SignalR.AspNet.dll. If I recall correctly it's responsible for adding the route to /signalr/hubs.


From the SignalR 1.0.0 RC2 there is a README in the packages folder that says the Hubs route must be manually established. :) Here is a snippet...

using System;using System.Web;using System.Web.Routing;namespace MyWebApplication{    public class Global : System.Web.HttpApplication    {        public void Application_Start()        {            // Register the default hubs route: ~/signalr            RouteTable.Routes.MapHubs();        }    }}