Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exception handling - Application_Error
Message
From
26/09/2003 11:53:08
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Exception handling - Application_Error
Miscellaneous
Thread ID:
00832735
Message ID:
00832735
Views:
56
I read (no, "devoured" is more the word) Jim Duffy's article on ASP.NET exception handling in the July/August issue of CoDe.

In addition to some try...catch error handling in some of my business and data objects, I implemented an application error handler by putting some code in the Application_Error() method of the Global.ASAX file.

The code is compiling fine, apparently, but when I try to test this by throwing an unhandled exception, the Application_Error method code isn't getting called.

My understanding of the application object is imperfect (boy, is that an understatement <g>), and I noteced that the Application_Error method is declared Private, so I figured that maybe I needed to "wire up" the event handler, and added the following line of code to the Global class's constructor:
this.Error += new System.EventHandler(this.Application_Error);
But to no avail - the thrown (and unhandled) exception still isn't being handled by the Application_Error method.

I have futzed with the mode settings in the section of the web.config, but none of the three values seem to have any effect on whether or not the Application_Error method is invoked in response to an unhandled exception.

FWIW, I am not doing any page-level exception handling.

Thanks.
>>-Steve->>

Steve Sawyer
Geeks and Gurus, Inc.
Reply
Map
View

Click here to load this message in the networking platform