Reputation: 597
Any request to a non existent file or folder is throwing the following exception on my MVC project;
System.Web.HttpException: The controller for path ... could not be found or it does not implement IController
Important Edit:
I would like to handle this case so that this exception does not go into my Elmah logs.
Whatever I do inside global.asax Application_Error goes to Elmah logs
Upvotes: 0
Views: 3451
Reputation: 11689
How about a 404 page?
This would be the last of your routes:
routes.MapRoute("NotFound", "{*url}",
new { controller = "Home", action = "Show404" }
);
Upvotes: 0