protected void Application_Error(object sender, EventArgs e) { Exception ex = Server.GetLastError(); string url = HttpContext.Current.Request.Url.ToString(); if (!url.EndsWith("png") && !url.EndsWith("jpg") && !url.EndsWith("gif") && !url.EndsWith("jpeg") && !url.EndsWith("bmp")) { ErrorHandler erHandler = new ErrorHandler(); erHandler.LogCommonException(ex); } }
protected void Application_Error(object sender, EventArgs e) { Exception ex = Server.GetLastError(); if (null != HttpContext.Current) { string url = HttpContext.Current.Request.Url.ToString(); ApplicationController objAppController = new ApplicationController(); if (objAppController.IsImageRequest(url)) { ErrorHandler erHandler = new ErrorHandler(); erHandler.LogCommonException(ex); } } }