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

后端 未结 3 1250
花落未央
花落未央 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:46

    This seems to be a big question here.

    See my answer is this post:

    Once and for all what is the best routing approach to handle errors, exceptions and 404's in MVC

    But i would add these routes to your test cases:

    http://www.website.com/yourcontroller/youraction:32

    and

    http://www.website.com/yourcontroller/youraction/http:/www.website.com/yourcontroller/youraction?par=123

提交回复
热议问题