UnhandledException event

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top