I want to be able to capture the exception that is thrown when a user requests a non-existent controller and re-direct it to a 404 page. How can I do this?
For examp
Take a look at this page for routing your 404-errors to a specified page.
Found this on the same site - Strategies for Resource based 404s
Just use a route:
// We couldn't find a route to handle the request. Show the 404 page.
routes.MapRoute("Error", "{*url}",
new { controller = "Error", action = "404" }
);
Since this will be a global handler, put it all the way at the bottom under the Default route.