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.