コード例 #1
0
ファイル: Global.asax.cs プロジェクト: psychotiic/speedyspots
        private void Filter(ExceptionFilterEventArgs e)
        {
            var exception = e.Exception.GetBaseException();
             var httpException = exception as HttpException;

             if (HttpContext.Current.Request.IsLocal)
             {
            e.Dismiss();
            return;
             }

             // User hit stop/esc while the page was posting back
             if (exception is HttpException && exception.Message.ToLower().Contains("the client disconnected.") ||
             exception.Message.ToLower().Contains("the remote host closed the connection."))
             {
            e.Dismiss();
            return;
             }

             // User hit stop while posting back and thew this error
             if (exception is ViewStateException && exception.Message.ToLower().Contains("invalid viewstate. client ip:"))
             {
            e.Dismiss();
            return;
             }
        }
コード例 #2
0
        void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs args)
        {
            if (args.Exception is ArgumentException)
            {
                args.Dismiss();
                return;
            }

            var context = (HttpContext)args.Context;
            if (context != null && context.Request.UserAgent != null)
            {

                if (context.Request.UserAgent == "Test Certificate Info" && args.Exception is System.Web.HttpException)
                {
                    args.Dismiss();
                    return;
                }

                if (context.Request.UserAgent.Contains("ZmEu"))
                {
                    args.Dismiss();
                    return;
                }

                if (context.Request.UserAgent.Contains("Googlebot"))
                {
                    args.Dismiss();
                    return;
                }
            }

            Filter(args);
        }
コード例 #3
0
 void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
 {
     if (e.Exception.GetBaseException() is HttpException && ((HttpException)e.Exception.GetBaseException()).GetHttpCode() == 404)
     {
         e.Dismiss();
     }
 }
コード例 #4
0
 private void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
 {
     if (e.Exception is System.Threading.ThreadAbortException)
     {
         e.Dismiss();
     }
 }
コード例 #5
0
ファイル: Global.asax.cs プロジェクト: ucdavis/Commencement
 //private static IWindsorContainer InitializeServiceLocator()
 //{
 //    //IWindsorContainer container = new WindsorContainer();
 //    //ControllerBuilder.Current.SetControllerFactory(new WindsorControllerFactory(container));
 //    //container.RegisterControllers(typeof(HomeController).Assembly);
 //    //ComponentRegistrar.AddComponentsTo(container);
 //    //ServiceLocator.SetLocatorProvider(() => new WindsorServiceLocator(container));
 //    //return container;
 //}
 /// <summary>
 /// ELMAH filtering for the mail log
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
 {
     if (e.Exception.GetBaseException() is HttpException)
     {
         e.Dismiss();
     }
 }
コード例 #6
0
        protected virtual void OnErrorModuleFiltering(object sender, ExceptionFilterEventArgs args)
        {
            if (args == null)
            {
                throw new ArgumentNullException("args");
            }

            if (args.Exception == null)
            {
                throw new ArgumentException(null, "args");
            }

            try
            {
                if (Assertion.Test(new AssertionHelperContext(sender, args.Exception, args.Context)))
                {
                    args.Dismiss();
                }
            }
            catch (Exception e)
            {
                Trace.WriteLine(e);
                throw;
            }
        }
コード例 #7
0
ファイル: Global.asax.cs プロジェクト: dwick/Me
 public void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
 {
     var httpException = e.Exception as HttpException;
     if (httpException != null && httpException.GetHttpCode() == 404 || Debugger.IsAttached)
     {
         e.Dismiss();
     }
 }
コード例 #8
0
 public void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
 {
     var httpException = e.Exception as JavaScriptException;
     if (httpException != null)
     {
         e.Dismiss();
     }
 }
コード例 #9
0
 private void Filter404Errors(ExceptionFilterEventArgs args)
 {
     if (args.Exception.GetBaseException() is HttpException)
     {
         var httpException = args.Exception.GetBaseException() as HttpException;
         if (httpException != null && httpException.GetHttpCode() == 404)
             args.Dismiss();
     }
 }
コード例 #10
0
ファイル: ErrorLogModule.cs プロジェクト: AdventureTech/elmah
        /// <summary>
        /// Raises the <see cref="Filtering"/> event.
        /// </summary>

        protected virtual void OnFiltering(ExceptionFilterEventArgs args)
        {
            ExceptionFilterEventHandler handler = Filtering;

            if (handler != null)
            {
                handler(this, args);
            }
        }
コード例 #11
0
ファイル: ErrorLogModule.cs プロジェクト: jaysilk84/ELMAH
        /// <summary>
        /// Logs an exception and its context to the error log.
        /// </summary>

        protected virtual void LogException(Exception e, HttpContextBase context)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            //
            // Fire an event to check if listeners want to filter out
            // logging of the uncaught exception.
            //

            ExceptionFilterEventArgs args = new ExceptionFilterEventArgs(e, context);

            OnFiltering(args);

            if (args.Dismissed)
            {
                return;
            }

            //
            // Log away...
            //

            ErrorLogEntry entry = null;

            try
            {
                Error    error = new Error(e, context);
                ErrorLog log   = GetErrorLog(context);
                error.ApplicationName = log.ApplicationName;

                OnLogging(new ErrorLoggingEventArgs(error));

                string id = log.Log(error);
                entry = new ErrorLogEntry(log, id, error);
            }
            catch (Exception localException)
            {
                //
                // IMPORTANT! We swallow any exception raised during the
                // logging and send them out to the trace . The idea
                // here is that logging of exceptions by itself should not
                // be  critical to the overall operation of the application.
                // The bad thing is that we catch ANY kind of exception,
                // even system ones and potentially let them slip by.
                //

                Trace.WriteLine(localException);
            }

            if (entry != null)
            {
                OnLogged(new ErrorLoggedEventArgs(entry));
            }
        }
コード例 #12
0
ファイル: Global.asax.cs プロジェクト: iPie/WebPresentations
 // Dismiss 404 errors for ELMAH
 private void FilterError404(ExceptionFilterEventArgs e)
 {
     if (e.Exception.GetBaseException() is HttpException)
     {
         HttpException ex = (HttpException)e.Exception.GetBaseException();
         if (ex.GetHttpCode() == 404)
             e.Dismiss();
     }
 }
コード例 #13
0
ファイル: Global.asax.cs プロジェクト: windforze/Bootstrap
 // Dismiss 404 errors for ELMAH
 private static void FilterError404(ExceptionFilterEventArgs e)
 {
     if (!(e.Exception.GetBaseException() is HttpException))
     {
         return;
     }
     var ex = (HttpException)e.Exception.GetBaseException();
     if (ex.GetHttpCode() == 404)
         e.Dismiss();
 }
コード例 #14
0
 // Dismiss 404 errors for ELMAH
 private void FilterError404(ExceptionFilterEventArgs e)
 {
     if (e.Exception.GetBaseException() is HttpException)
     {
         HttpException ex = (HttpException)e.Exception.GetBaseException();
         if (ex.GetHttpCode() == 404)
             e.Dismiss();
     }
    // Response.Redirect(@"/Error/Trouble");
 }
コード例 #15
0
        public void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
        {
            var httpException = e.Exception as HttpException;
            if (httpException != null && httpException.GetHttpCode() == 404)
            {
                e.Dismiss();
            }

            #if DEBUG
                e.Dismiss();
            #endif
        }
コード例 #16
0
 /// <summary>
 /// This method checks the HttpContext associated with the Exception for any sensitive
 /// data submitted in the form that should not be logged in plain text.
 /// If fields are found that match the names in the SensitiveFieldNames list, their values
 /// are replaced with **** before the error is logged.
 /// </summary>
 /// <param name="args"></param>
 internal static void FilterSensitiveData(ExceptionFilterEventArgs args)
 {
     if (args.Context != null)
     {
         HttpContext context = (HttpContext)args.Context;
         if (context.Request != null &&
             context.Request.Form != null &&
             context.Request.Form.AllKeys.Intersect(sensitiveFieldNames, StringComparer.InvariantCultureIgnoreCase).Any())
         {
             ReplaceSensitiveFormFields(args, context);
         }
     }
 }
コード例 #17
0
        private static void ReplaceSensitiveFormFields(ExceptionFilterEventArgs args, HttpContext context)
        {
            var replacementError = new Error(args.Exception, (HttpContext)args.Context);

            foreach (var formField in context.Request.Form.AllKeys)
            {
                if (sensitiveFieldNames.Contains(formField, StringComparer.InvariantCultureIgnoreCase))
                {
                    replacementError.Form.Set(formField, "****");
                }
            }

            ErrorLog.GetDefault(HttpContext.Current).Log(replacementError);
            args.Dismiss();
        }
コード例 #18
0
ファイル: Global.asax.cs プロジェクト: wvanderheide/slnWalter
        protected void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
        {
            // Cancels elmah logging for these conditions.

            //if (!Request.Url.ToString().ToLower().Contains(ConfigurationManager.AppSettings["klasresearchURL"], true) || Request.UserAgent.ToLower().Contains("bot", true) || Request.UserAgent.ToLower().Contains("spider", true) || Request.UserAgent.ToLower().Contains("crawler", true) || Request.UserAgent.ToLower().Contains("slurp", true) || Request.UserAgent.ToLower().Contains("ezooms", true))
            //{

            //    e.Dismiss();

            //}

            //if (Request.Url.ToString().ToLower().Contains("jw-icons.eot"))
            //{

            //    e.Dismiss();

            //}
        }
コード例 #19
0
ファイル: Global.asax.cs プロジェクト: vanutama/bvcms
        public void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
        {
            var ex = e.Exception.GetBaseException();
            var httpex = ex as HttpException;

            if (httpex != null)
            {
                var status = httpex.GetHttpCode();
                if (status == 400 || status == 404)
                    e.Dismiss();
                else if (httpex.Message.Contains("The remote host closed the connection"))
                    e.Dismiss();
                else if (httpex.Message.Contains("A potentially dangerous Request.Path value was detected from the client"))
                    e.Dismiss();
            }

            if (ex is FileNotFoundException || ex is HttpRequestValidationException)
                e.Dismiss();
        }
コード例 #20
0
ファイル: ErrorFilterModule.cs プロジェクト: elmah/Elmah
        protected virtual void OnErrorModuleFiltering(object sender, ExceptionFilterEventArgs args)
        {
            if (args == null)
                throw new ArgumentNullException("args");
            
            if (args.Exception == null)
                throw new ArgumentException(null, "args");

            try
            {
                if (Assertion.Test(new AssertionHelperContext(sender, args.Exception, args.Context)))
                    args.Dismiss();
            }
            catch (Exception e)
            {
                Trace.WriteLine(e);
                throw;
            }
        }
コード例 #21
0
        protected override void LogException(Exception e, HttpContext context)
        {
            if (e == null)
                throw new ArgumentNullException("e");

            var args = new ExceptionFilterEventArgs(e, context);
            OnFiltering(args);

            if (args.Dismissed)
                return;

            try
            {
                e.SendToAirbrake();
            }
            catch (Exception localException)
            {
                Trace.WriteLine(localException);
            }
        }
コード例 #22
0
        /// <summary>
        /// Reports the exception.
        /// </summary>
        protected virtual void OnError(Exception e, HttpContext context)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            // Fire an event to check if listeners want to filter out reporting of the uncaught exception.
            Elmah.ExceptionFilterEventArgs args = new Elmah.ExceptionFilterEventArgs(e, context);
            OnFiltering(args);

            if (args.Dismissed)
            {
                return;
            }

            // Get the last error and then write it to the EventLog.
            Elmah.Error error = new Elmah.Error(e, context);
            ReportError(error);
        }
        private static void FilterException(object sender, ExceptionFilterEventArgs args)
        {
            var httpContext = args.Context as HttpContext;
            var error = new Error(args.Exception, httpContext.ApplicationInstance.Context);

            var sensitiveFormDataNames = httpContext.Items[Constants.HttpContextItemsKey] as IEnumerable<string>;
            if (sensitiveFormDataNames == null)
            {
                return;
            }

            var sensitiveFormData = httpContext.Request.Form.AllKeys
                .Where(key => sensitiveFormDataNames.Contains(key.ToLowerInvariant()))
                .ToList();
            if (sensitiveFormData.Any())
            {
                sensitiveFormData.ForEach(k => error.Form.Set(k, Config.SensitiveDataReplacementText));
                ErrorLog.GetDefault(httpContext).Log(error);
                args.Dismiss();
            }
        }
コード例 #24
0
        /// <summary>
        /// Reports the exception.
        /// </summary>

        protected virtual void OnError(Exception e, HttpContext context)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            //
            // Fire an event to check if listeners want to filter out
            // reporting of the uncaught exception.
            //

            ExceptionFilterEventArgs args = new ExceptionFilterEventArgs(e, context);

            OnFiltering(args);

            if (args.Dismissed)
            {
                return;
            }

            //
            // Get the last error and then report it synchronously or
            // asynchronously based on the configuration.
            //

            Error error = new Error(e, context);

            if (_reportAsynchronously)
            {
                ReportErrorAsync(error);
            }
            else
            {
                ReportError(error);
            }
        }
コード例 #25
0
 //Dimiss 404 errors for ELMAH
 protected void FilterError(ExceptionFilterEventArgs e)
 {
     if (e.Exception.GetBaseException() is HttpException)
     {
         HttpException ex = (HttpException)e.Exception.GetBaseException();
         if (ex.Message.Contains("A potentially dangerous Request.Path value was detected from the client"))
             e.Dismiss();
         else
         {
             switch (ex.GetHttpCode())
             {
                 case 404:
                     e.Dismiss();
                     break;
                 case 410:
                     e.Dismiss();
                     break;
                 case 406:
                     e.Dismiss();
                     break;
             }
         }
     }
 }
コード例 #26
0
ファイル: Global.asax.cs プロジェクト: vanutama/bvcms
        private static void FilterOutSensitiveFormData(ExceptionFilterEventArgs e)
        {
            var ctx = e.Context as HttpContext;
            if (ctx == null)
                return;

            var sensitiveFormKeys = new[] { "creditcard", "ccv", "cvv", "cardnumber", "cardcode", "password", "account", "routing" };

            var sensitiveFormData = ctx.Request.Form.AllKeys.Where(
                k => sensitiveFormKeys.Contains(k.ToLower(), StringComparer.OrdinalIgnoreCase)).ToList();

            if (!sensitiveFormData.Any() || Util.IsDebug())
                return;

            var error = new Error(e.Exception, ctx);
            sensitiveFormData.ForEach(k => error.Form.Set(k, "*****"));
            ErrorLog.GetDefault(ctx).Log(error);
            e.Dismiss();
        }
コード例 #27
0
 protected void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs args)
 {
     ElmahFilter.FilterSensitiveData(args);
 }
コード例 #28
0
ファイル: Global.asax.cs プロジェクト: iPie/WebPresentations
 // ELMAH Filtering
 protected void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
 {
     FilterError404(e);
 }
コード例 #29
0
 public void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
  {
      // perform filtering here   
     
  }
コード例 #30
0
ファイル: ErrorTweetModule.cs プロジェクト: elmah/Elmah
        /// <summary>
        /// Logs an exception and its context to the error log.
        /// </summary>

        protected virtual void LogException(Exception e, HttpContextBase context)
        {
            if (e == null)
                throw new ArgumentNullException("e");

            //
            // Fire an event to check if listeners want to filter out
            // logging of the uncaught exception.
            //

            var args = new ExceptionFilterEventArgs(e, context);
            OnFiltering(args);
            
            if (args.Dismissed)
                return;

            //
            // Tweet away...
            //

            HttpWebRequest request = null;

            try
            {
                var status = StringFormatter.Format(_statusFormat, new Error(e, context));

                //
                // Apply ellipsis if status is too long. If the trimmed 
                // status plus ellipsis yields nothing then just use
                // the trimmed status without ellipsis. This can happen if
                // someone gives an ellipsis that is ridiculously long.
                //

                var maxLength = _maxStatusLength;
                if (status.Length > maxLength) 
                {
                    var ellipsis = _ellipsis;
                    var trimmedStatusLength = maxLength - ellipsis.Length;
                    status = trimmedStatusLength >= 0
                           ? status.Substring(0, trimmedStatusLength) + ellipsis
                           : status.Substring(0, maxLength);
                }

                //
                // Submit the status by posting form data as typically down
                // by browsers for forms found in HTML.
                //

                request = (HttpWebRequest) WebRequest.Create(_url);
                request.Method = "POST"; // WebRequestMethods.Http.Post;
                request.ContentType = "application/x-www-form-urlencoded";

                if (_credentials != null)   // Need Basic authentication?
                {
                    request.Credentials = _credentials;
                    request.PreAuthenticate = true;
                }

                // See http://blogs.msdn.com/shitals/archive/2008/12/27/9254245.aspx
                request.ServicePoint.Expect100Continue = false;

                //
                // URL-encode status into the form and get the bytes to
                // determine and set the content length.
                //
                
                var encodedForm = string.Format(_formFormat, Uri.EscapeDataString(status));
                var data = Encoding.ASCII.GetBytes(encodedForm);
                Debug.Assert(data.Length > 0);
                request.ContentLength = data.Length;

                //
                // Get the request stream into which the form data is to 
                // be written. This is done asynchronously to free up this
                // thread.
                //
                // NOTE: We maintain a (possibly paranoid) list of 
                // outstanding requests and add the request to it so that 
                // it does not get treated as garbage by GC. In effect, 
                // we are creating an explicit root. It is also possible
                // for this module to get disposed before a request
                // completes. During the callback, no other member should
                // be touched except the requests list!
                //

                _requests.Add(request);

                var ar = request.BeginGetRequestStream(OnGetRequestStreamCompleted, 
                                                       AsyncArgs(request, data));
            }
            catch (Exception localException)
            {
                //
                // IMPORTANT! We swallow any exception raised during the 
                // logging and send them out to the trace . The idea 
                // here is that logging of exceptions by itself should not 
                // be  critical to the overall operation of the application.
                // The bad thing is that we catch ANY kind of exception, 
                // even system ones and potentially let them slip by.
                //

                OnWebPostError(request, localException);
            }
        }
コード例 #31
0
ファイル: ErrorLogModule.cs プロジェクト: jaysilk84/ELMAH
        /// <summary>
        /// Logs an exception and its context to the error log.
        /// </summary>
        protected virtual void LogException(Exception e, HttpContextBase context)
        {
            if (e == null)
                throw new ArgumentNullException("e");

            //
            // Fire an event to check if listeners want to filter out
            // logging of the uncaught exception.
            //

            ExceptionFilterEventArgs args = new ExceptionFilterEventArgs(e, context);
            OnFiltering(args);

            if (args.Dismissed)
                return;

            //
            // Log away...
            //

            ErrorLogEntry entry = null;

            try
            {
                Error error = new Error(e, context);
                ErrorLog log = GetErrorLog(context);
                error.ApplicationName = log.ApplicationName;

                OnLogging(new ErrorLoggingEventArgs(error));

                string id = log.Log(error);
                entry = new ErrorLogEntry(log, id, error);
            }
            catch (Exception localException)
            {
                //
                // IMPORTANT! We swallow any exception raised during the
                // logging and send them out to the trace . The idea
                // here is that logging of exceptions by itself should not
                // be  critical to the overall operation of the application.
                // The bad thing is that we catch ANY kind of exception,
                // even system ones and potentially let them slip by.
                //

                Trace.WriteLine(localException);
            }

            if (entry != null)
                OnLogged(new ErrorLoggedEventArgs(entry));
        }
コード例 #32
0
ファイル: Global.asax.cs プロジェクト: mengithub/XP-2
 void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e)
 {
     if (e.Exception.GetBaseException() is HttpRequestValidationException)
         e.Dismiss();
 }
コード例 #33
0
ファイル: ErrorMailModule.cs プロジェクト: sheryever/elmahex
        /// <summary>
        /// Reports the exception.
        /// </summary>
        protected virtual void OnError(Exception e, HttpContext context, string applciationName)
        {
            if (e == null)
                throw new ArgumentNullException("e");

            //
            // Fire an event to check if listeners want to filter out
            // reporting of the uncaught exception.
            //

            ExceptionFilterEventArgs args = new ExceptionFilterEventArgs(e, context);
            OnFiltering(args);

            if (args.Dismissed)
                return;

            //
            // Get the last error and then report it synchronously or
            // asynchronously based on the configuration.
            //

            Error error = new Error(e, context);

            if (!string.IsNullOrEmpty(applciationName))
                error.ApplicationName = applciationName;

            if (_reportAsynchronously)
                ReportErrorAsync(error);
            else
                ReportError(error);
        }
コード例 #34
0
ファイル: ErrorTweetModule.cs プロジェクト: jaysilk84/ELMAH
        /// <summary>
        /// Logs an exception and its context to the error log.
        /// </summary>

        protected virtual void LogException(Exception e, HttpContextBase context)
        {
            if (e == null)
            {
                throw new ArgumentNullException("e");
            }

            //
            // Fire an event to check if listeners want to filter out
            // logging of the uncaught exception.
            //

            ExceptionFilterEventArgs args = new ExceptionFilterEventArgs(e, context);

            OnFiltering(args);

            if (args.Dismissed)
            {
                return;
            }

            //
            // Tweet away...
            //

            HttpWebRequest request = null;

            try
            {
                string status = StringFormatter.Format(_statusFormat, new Error(e, context));

                //
                // Apply ellipsis if status is too long. If the trimmed
                // status plus ellipsis yields nothing then just use
                // the trimmed status without ellipsis. This can happen if
                // someone gives an ellipsis that is ridiculously long.
                //

                int maxLength = _maxStatusLength;
                if (status.Length > maxLength)
                {
                    string ellipsis            = _ellipsis;
                    int    trimmedStatusLength = maxLength - ellipsis.Length;
                    status = trimmedStatusLength >= 0
                           ? status.Substring(0, trimmedStatusLength) + ellipsis
                           : status.Substring(0, maxLength);
                }

                //
                // Submit the status by posting form data as typically down
                // by browsers for forms found in HTML.
                //

                request             = (HttpWebRequest)WebRequest.Create(_url);
                request.Method      = "POST"; // WebRequestMethods.Http.Post;
                request.ContentType = "application/x-www-form-urlencoded";

                if (_credentials != null)   // Need Basic authentication?
                {
                    request.Credentials     = _credentials;
                    request.PreAuthenticate = true;
                }

                // See http://blogs.msdn.com/shitals/archive/2008/12/27/9254245.aspx
                request.ServicePoint.Expect100Continue = false;

                //
                // URL-encode status into the form and get the bytes to
                // determine and set the content length.
                //

                string encodedForm = string.Format(_formFormat, HttpUtility.UrlEncode(status));
                byte[] data        = Encoding.ASCII.GetBytes(encodedForm);
                Debug.Assert(data.Length > 0);
                request.ContentLength = data.Length;

                //
                // Get the request stream into which the form data is to
                // be written. This is done asynchronously to free up this
                // thread.
                //
                // NOTE: We maintain a (possibly paranoid) list of
                // outstanding requests and add the request to it so that
                // it does not get treated as garbage by GC. In effect,
                // we are creating an explicit root. It is also possible
                // for this module to get disposed before a request
                // completes. During the callback, no other member should
                // be touched except the requests list!
                //

                _requests.Add(request);

                IAsyncResult ar = request.BeginGetRequestStream(
                    new AsyncCallback(OnGetRequestStreamCompleted),
                    AsyncArgs(request, data));
            }
            catch (Exception localException)
            {
                //
                // IMPORTANT! We swallow any exception raised during the
                // logging and send them out to the trace . The idea
                // here is that logging of exceptions by itself should not
                // be  critical to the overall operation of the application.
                // The bad thing is that we catch ANY kind of exception,
                // even system ones and potentially let them slip by.
                //

                OnWebPostError(request, localException);
            }
        }
コード例 #35
0
ファイル: ErrorLogModule.cs プロジェクト: jaysilk84/ELMAH
        /// <summary>
        /// Raises the <see cref="Filtering"/> event.
        /// </summary>
        protected virtual void OnFiltering(ExceptionFilterEventArgs args)
        {
            ExceptionFilterEventHandler handler = Filtering;

            if (handler != null)
                handler(this, args);
        }
コード例 #36
0
 void MyErrorMailModule_Filtering(object sender, ExceptionFilterEventArgs args)
 {
     var httpException = args.Exception.GetBaseException() as HttpException;
     if (httpException != null && httpException.GetHttpCode() == 404)
         args.Dismiss();
 }