Exception Handling using an ASP error page

Topics: Exception Handling Application Block, General discussion
May 9, 2007 at 11:17 PM
How do I notify an user with the HandlingInstanceID on a ASP custom error page. I'm new to dotnet and web programming but have more years than I wish to think about programming client/server apps. I'm using EntLib (June 2005) and have tried some strategies similiar to the "QuickStarts" specifically the Walkthrough: Notify User (but this is Windows Form based). I have been able to log the exception and chain to a new exception type that replaces the original, but the exception GUID loses scope when I get the my error page. Anyone out there conquer this, or maybe refer me to an example, or even a previous post. I have seen the problem posed numerous times on different sites and references to similiar problems on this site, but no one has seemed to offer up a solution. By the way...very impressed with EntLib, I have been learning alot over the last week.
May 10, 2007 at 3:16 PM
This is an older blog post but still pretty valid:


You can toss the custom error message ( which would include HandlingInstanceID ) in a Session Variable and transer to a custom error page to display it to a user.




David Hayden
Microsoft MVP C#
May 11, 2007 at 11:25 PM
Dave... thanks for pulling me back down to earth. Boy was I over thinking this one. I'm still throwing out to much info to the user but at least the GUID is there and it's not showing real sensitive stuff. I'll keep looking into some of the formatting options to place in the global application_error method. Thanks again.