Hi folks,
consider the following situation:
There is an ASP.NET MVC application which utilizes ELMAH for centralized ExceptionLogging. A Controller is marked with the HandlerError Attribute to catch a specific type of an exception and presents the user with a view. For example
[HandleError(ExceptionType = typeof(ModelSpecificException), View = "Exceptions/ModelSpecific")]
public partial class HeavyController : Controller
{
// Constructors and ActionResults are following here...
}
This is working as expected so far. The problem I am facing right now is, that the "ModelSpecific" error page is needing some Objects within the ViewData. Does anyone has a hint on populating the ViewData Dictionary of a ViewPage of following Type
System.Web.Mvc.ViewPage<HandleErrorInfo>
Another idea which comes to my my mind is, that maybe a Controller could be used for the ErrorHandling with respective ActionResults. But currently I don't have a clue on how to accomplish that.
Any help is very appreciated...
best regards,
Gordon