I'm trying to do something with unhandled exceptions.
For some reason, it is very hard to show an error page if an unhandled exception occurs. I found a way to redirect 404, 403 etc. using an ErrorController. A 500 exception however always shows inside the active MVC view.
What works is something like this (simplified code):
return View("Index", model);
This RedirectToRoute will redirect to:
I wanted to do something like this in the OnException override of my BaseController class like this:
filterContext.Result = RedirectToRoute(ErrorControllerRoute.GetInternalServerError);
However, that is not working. The URL it generates in this case is:
So, it looks like the ErrorController class is ignored.
Any idea how this works within Sitefinity?