TheChaseMan's Frenetic SoapBox

Always looking for better ways to do things...

ASP.NET Exceptions...Global Handler

Seems like a good idea, but I'm all about finding better ways to do things. Pop in a suggestion if you have one...

 

<customErrors mode ="RemoteOnly" defaultRedirect ="MyErrorPage.aspx" />

protected void Application_Error(Object sender, EventArgs e) {
   
try {
        Exception ex = Server.GetLastError().GetBaseException();
        HttpContext.Current.Cache.Insert("LastException", ex);
        LogException(ex);
    }
    catch {}
}


Digg!

posted on Friday, May 14, 2004 1:08 PM

Feedback

No comments posted yet.