views:

38

answers:

1

Hi there,

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

A: 

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: http://stackoverflow.com/questions/183316/asp-net-mvc-handleerror

Fabiano