To get that model, you need to use the HandleErrorAttribute
filter to catch the error.
You can see instructions here: http://www.c-sharpcorner.com/UploadFile/abhikumarvatsa/handleerrorattribute-or-error-handling-in-mvc-4/
TL;DR:
Disable the redirect, but make sure custom errors are still on:
<customErrors mode="On"/>
Make sure the HandleErrorAttribute
filter is registered globally (it is by default):
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
Move/rename your error view to ~\Views\Shared\Error.cshtml