views:

226

answers:

1

I think this is pretty typical, you have the same website project with an "admin" section and a public facing section. In this website I want to configure the default errors, but I also want them to display in the correct layout. (the admin looks different than the public facing site).

In webforms you could put a different web.config in the the admin directory to take care of this, is there anyway to do it in MVC?

+2  A: 

Set the View (or Master) property of HandleErrorAttribute:

[HandleError(View="Foo")]
public ActionResult Bar(...
Craig Stuntz