Click here to Skip to main content
14,921,874 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I´m creating a MVC5 app using Attribute Routing. After reading many Error Handling stuff, I create a CustomErrorHandlerAttribute, create an Application_Error method into global.asax and modify the web.config customErrors tag.
The routes are mapped as attributes aka [Route("Account")].... so the route mapping is defined as:
C#
public static void RegisterRoutes(RouteCollection routes)
{
    routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

    routes.MapMvcAttributeRoutes();
}

I get only the 404.0 standar error page not my custom page. I put an interruption point at the begining of the CustomHandlerAttribute and Application_Error Methods and could not catch it.

Where the routing error is thrown in order to catch it?

Any Idea of what is happening?

Thanks in advance,
Toni
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900