I\'m currently using log4net in my ASP.NET MVC application to log exceptions. The way I\'m doing this is by having all my controllers inherit from a BaseController class.
The Error.aspx view is defined like this:
namespace MvcApplication1.Views.Shared
{
public partial class Error : ViewPage
{
}
}
The HandleErrorInfo has three properties: string ActionName string ControllerName Exception Exception
You should be able to access HandleErrorInfo and therefore the Exception within the view.