How to have a custom 404 and 500 error pages with a stock standard ASP.NET MVC3 website?

后端 未结 3 1249
花落未央
花落未央 2021-02-04 14:05

I\'m trying to have 2 custom error pages in a stock sample ASP.NET MVC3 website.

Darin Dimitrov has a good SO answer here but it\'s not working for all my test condition

3条回答
  •  逝去的感伤
    2021-02-04 14:59

    You can set your error page information in the web.config. This page talks about doing this and using the HandleErrorAttribute set on your controllers so they use this configuration.

    http://deanhume.com/Home/BlogPost/custom-error-pages-in-mvc/4

提交回复
热议问题