VS2013 Browser Link “The controller for path '/9ac086a69364466a841e03e001f946fd/arterySignalR/ping' could not be found.”

前端 未结 6 1978
鱼传尺愫
鱼传尺愫 2020-12-14 06:18

Since updating to VS2013, we receive this error when running our (MCV4) web app:

The controller for path \'/9ac086a69364466a841e03e001f946fd/arterySignalR/pi         


        
6条回答
  •  执念已碎
    2020-12-14 06:34

    If you would like the benefit of Browser Link but don't want the missing controller path exceptions, you can add an ignore regex to your route collection. This is what I did:

    public static void RegisterRoutes(RouteCollection routes)
    {
        routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
    
    #if DEBUG
        routes.IgnoreRoute("{*browserlink}", new { browserlink = @".*/arterySignalR/ping" });
    #endif
    
        //...
    }
    

    The regex technique is courtesy of this Phil Haack post.

提交回复
热议问题