【问题标题】:Error filters in web.config are ignored when using ErrorLog_Filtering with ELMAH将 ErrorLog_Filtering 与 ELMAH 一起使用时,将忽略 web.config 中的错误过滤器
【发布时间】:2017-06-13 14:21:56
【问题描述】:

我已经实现了一个 elmah 过滤器,它使用类似于 here 描述的方法,通过覆盖 Global.asax 中的 ErrorLog_Filtering 来从正在记录的异常中删除敏感信息。

这很好用,但它忽略了我通过 <errorFilter> 元素在 web.config 中设置的过滤器。

有什么方法可以应用我的自定义清理过滤器,但仍然可以使用 web.config 中指定的过滤器?

【问题讨论】:

    标签: elmah


    【解决方案1】:

    在这里回答我自己的问题——就像在我的清理助手中处理/记录异常之前检查 e.Dismissed 是否已经设置(例如,通过错误过滤器模块)一样简单。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-23
      • 2021-06-17
      • 2010-09-24
      • 2010-12-17
      • 1970-01-01
      • 1970-01-01
      • 2019-09-26
      • 2023-03-13
      相关资源
      最近更新 更多