No route Constraints set only shows new IRouteConstraintProxy #1165

Imported from the CodePlex archive for reference purposes. Support for MvcCodeRouting has ended.

Reported on

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

Commented on link

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

Commented on link

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 });
Commented on link

I’m not responsible for Castle.Proxies.IRouteConstraintProxy