I was looking for exactly the same thing. One small change I make is to use the location element in the main web.config. This is a matter of preference, I suppose, but it is stopping you from creating a separate folder and file in your solution. I would love to know a better way though.
<system.web>
<customErrors mode="On" defaultRedirect="error" />
</system.web>
.
.
.
<location path="areaName">
<system.web>
<customErrors mode="On" defaultRedirect="/areaName/error" />
</system.web>
</location>
source
share