开发者

asp.net MVC: RescueAttribute (mvccontrib) vs HandleErrrorsAttribute?

I recently came across the rescue attribute which is part of the mvccontrib project... At first glance it appeared to allow you to server up different error views depending on controller / actions etc..

But taking a closer look, it also appears that the standard HandleError attribute that ships with mvc also allows you to do the same..

So i am a little confused, what are the pros and cons using 开发者_开发百科the Rescue attribute... it seems to do exactly the same as the HandleError

Any help or insight really appreciated


I don't know all the differences but one of them is that the HandleError attribute only works with the <customError> section of your web.config which has to be set to <customError mode="On" /> while RescueAttribute works without this section.

see also the answer from Corin in this question for an other difference: ASP.NET MVC HandleError

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜