How do I display custom error pages in Asp.Net Mvc 3?
问题 I want all 401 errors to be be redirected to a custom error page. I have initially setup the following entry in my web.config. <customErrors defaultRedirect="ErrorPage.aspx" mode="On"> <error statusCode="401" redirect="~/Views/Shared/AccessDenied.aspx" /> </customErrors> When using IIS Express I receive the stock IIS Express 401 error page. In the event when I do not use IIS Express a blank page is returned. Using Google Chrome's Network tab to inspect the response, I see that while the page