This project is read-only.
1
Vote

No route Constraints set only shows new IRouteConstraintProxy

description

When I go and check on the routes generated for my MVC site I have the following for every controller in the route config:-

routes.MapRoute(null, "{action}",
new { controller = "Home", action = "Index" }, 
new { action = new IRouteConstraintProxy() }, 
new[] { "routeTest.Controllers" });
Is there an obvious reason why this would be happening?

Thanks

comments

maxtoroq wrote Jun 30, 2015 at 4:19 PM

I don't know what IRouteConstraintProxy is, maybe if you hover it you can see the fully-qualified name.

adamclifford wrote Jul 2, 2015 at 1:39 PM

The fully qualified name is Castle.Proxies.IRouteConstraintProxy.

here is the output of the routes.axd
// MvcCodeRouting v1.3.0
// Format: C# - Visual Basic

// route: "__browserLink/requestData/{requestId}", handler: Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataRouteHandler, Microsoft.VisualStudio.Web.PageInspector.Runtime, Version=12.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

routes.MapRoute(null, "elmah/{resource}", 
    new { controller = "Elmah", action = "Index", resource = UrlParameter.Optional }, 
    new[] { "Elmah.Mvc" });

routes.MapRoute(null, "elmah/detail/{resource}", 
    new { controller = "Elmah", action = "Detail", resource = UrlParameter.Optional }, 
    new[] { "Elmah.Mvc" });

routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

routes.IgnoreRoute("Content/{*pathInfo}");

routes.IgnoreRoute("Scripts/{*pathInfo}");

routes.IgnoreRoute("Error/Forbidden.html");

routes.IgnoreRoute("Error/GatewayTimeout.html");

routes.IgnoreRoute("Error/ServiceUnavailable.html");

routes.IgnoreRoute("humans.txt");

#region (root)

routes.MapRoute(null, "{action}", 
    new { controller = "Home", action = "Index" }, 
    new { action = new IRouteConstraintProxy() }, 
    new[] { "routeTest.Controllers" });

routes.MapRoute(null, "Error/{action}", 
    new { controller = "Error" }, 
    new { action = new IRouteConstraintProxy() }, 
    new[] { "routeTest.Controllers" });

#endregion

routes.MapRoute(null, "{controller}/{action}/{id}", 
    new { controller = "Home", action = "Index", id = UrlParameter.Optional });

maxtoroq wrote Jul 2, 2015 at 3:25 PM

I'm not responsible for Castle.Proxies.IRouteConstraintProxy