I have a [HandleError] attribute specified atop one of my controllers, specifying a View that I'd like to render in the event of an error.
I also have the following config section in my web.config:
<customErrors mode="On">
<error statusCode="404" redirect="~/Error/NotFound"/>
<error statusCode="500" redirect="~/Error/Unknown"/>
</customErrors>
No matter what happens, mvc renders the view in the customErrors section. I cannot override the View for some reason.
Also, I've lost all contextual information by the time the view renders.
Not sure what I'm doing wrong or if someone else has experienced this problem.
ps: I've also confirmed the Views that I'm trying to redirect to don't have any errors in them. Very frusterating problem!