ASP.NET MVC Custom Error page (StatusCode 404 throws a 500)
I found out some interesting information here: http://blog.angrypets.com/2008/03/responsetryskip.html
Response.TrySkipIisCustomErrors = true;
Setting TrySkipIisCustomErrors
to true
after the Response.StatusCode = 404;
takes care of the issue.