There is a trick in my base controller that handles errors that I will not catch. This is something like this:
protected override void OnException(ExceptionContext filterContext) {
Now it works fine if there is an error in the controller . The problem is that if an error occurs while rendering the aspx page (say, in the HtmlHelper method), a complete view of the error is displayed, in place on the page where the error occurred . This means that the entire error page (MasterPage and all) receives a visualization on the error page. Not quite expected behavior.
I tried to change the view to RedirectToAction, but this will not work, since the route does not exist for each controller (Main / Error, Configuration / Error, etc.).
How can I make this work for both errors in the controller and errors on the page?
asp.net-mvc error-handling
Will
source share