UnhandledException event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi misters,

is it possible use AppDomain.Currentdomain. UnhandledException event en
ASP.NET 2.0 ??

I have this code:

protected override void OnInit(EventArgs e)
{
base.OnInit(e);

PantallaControlIULogging.TrazarDebug("Principal. OnInit.");

PantallaControlIULogging.TrazarWarning("Principal.
CurrentDomain_UnhandledException. ");
AppDomain.CurrentDomain.UnhandledException -= new
UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
}

and

protected void Page_Load(object sender, EventArgs e)
{
PantallaControlIULogging.TrazarWarning("Principal.
CurrentDomain_UnhandledException. ");
AppDomain.CurrentDomain.UnhandledException -= new
UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
AppDomain.CurrentDomain.UnhandledException += new
UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
....


I don't get fire that event when throw an error

protected void b2click(object sender, EventArgs e)
{
// Forzar error
throw new
Excepciones.BloqueoTareaExcepcion("ERROR BloqueoTareaExcepcion!!!");


By other reasons, I cannot access to global.asax and I cannot use
HttpApplication_Error event.

Any help will be appreciated, and I'll be very grateful. Thanks in advance.
Greetings, regards.
 
Back
Top