C# Класс 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!

Наследование: IHttpModule
Показать файл Открыть проект

Открытые методы

Метод Описание
Dispose ( ) : void
Init ( System.Web.HttpApplication context ) : void

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
OnPostMapRequestHandler ( object sender, EventArgs args ) : void

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Init() публичный Метод

public Init ( System.Web.HttpApplication context ) : void
context System.Web.HttpApplication
Результат void

IsAsyncPostBackRequest() защищенный Метод

protected IsAsyncPostBackRequest ( System.Web.HttpRequestBase request ) : bool
request System.Web.HttpRequestBase
Результат bool

LogException() защищенный Метод

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
Результат void

OnPageError() защищенный Метод

protected OnPageError ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
Результат void