C# Class Elmah.MsAjaxDeltaErrorLogModule

Module to log unhandled exceptions during a delta-update request issued by the client when a page uses the UpdatePanel introduced with ASP.NET 2.0 AJAX Extensions.

This module is ONLY required when dealing with v1.0.x.x of System.Web.Extensions.dll (i.e. the downloadable version to extend v2.0 of the .Net Framework)

Using it with v3.5 of System.Web.Extensions.dll (which shipped as part of v3.5 of the .Net Framework) will result in a duplication of errors.

This is because MS have changed the implementation of System.Web.UI.PageRequestManager.OnPageError

In v1.0.x.x, the code performs a brutal Response.End(); in an attempt to "tidy up"! This means that the error will not bubble up to the Application.Error handlers, so Elmah is unable to catch them.

In v3.5, this is handled much more gracefully, allowing Elmah to do its thing without the need for this module!

Inheritance: IHttpModule
Mostra file Open project: clearwavebuild/elmah

Public Methods

Method Description
Dispose ( ) : void
Init ( System.Web.HttpApplication context ) : void

Protected Methods

Method Description
IsAsyncPostBackRequest ( System.Web.HttpRequestBase request ) : bool
LogException ( Exception e, System.Web.HttpContextBase context ) : void

Logs an exception and its context to the error log.

OnPageError ( object sender, EventArgs args ) : void

Private Methods

Method Description
OnPostMapRequestHandler ( object sender, EventArgs args ) : void

Method Details

Dispose() public method

public Dispose ( ) : void
return void

Init() public method

public Init ( System.Web.HttpApplication context ) : void
context System.Web.HttpApplication
return void

IsAsyncPostBackRequest() protected method

protected IsAsyncPostBackRequest ( System.Web.HttpRequestBase request ) : bool
request System.Web.HttpRequestBase
return bool

LogException() protected method

Logs an exception and its context to the error log.
protected LogException ( Exception e, System.Web.HttpContextBase context ) : void
e System.Exception
context System.Web.HttpContextBase
return void

OnPageError() protected method

protected OnPageError ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
return void