62,074
社区成员
发帖
与我相关
我的任务
分享
public class ExceptionModule : IHttpModule
{
#region IHttpModule 成员
public void Init(HttpApplication application)
{
application.Error += new EventHandler(OnError);
}
public void Dispose()
{
}
#endregion
/// <summary>
/// 错误处理
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
public void OnError(object sender, EventArgs args)
{
HttpApplication application = (HttpApplication)sender;
te_ExceptionLog log = GetExceptionLog(application.Server.GetLastError(), application.Context);
string ExceptionProcessWay = ConfigurationManager.AppSettings["ExceptionProcessWay"];
IExceptionProcess server = (IExceptionProcess)Activator.GetObject(typeof(IExceptionProcess), ConfigurationManager.AppSettings["ETSRemotingURL"].ToString());
server.LogException(log, ExceptionProcessWay);
}