2012-09-20 51 views
1

我使用elmah wiki的官方示例,但此错误一直显示在我的日志中,我该如何解决?以下是我的elmah配置,非常感谢。无法过滤“从客户端检测到潜在危险的Request.Form值”在elmah

<sectionGroup name="elmah"> 
     <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah" /> 
     <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /> 
     <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" /> 
     <section name="errorFilter" requirePermission="false" type="Elmah.ErrorFilterSectionHandler, Elmah" /> 
    </sectionGroup> 

<elmah> 
    <errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="elmah" /> 
    <security allowRemoteAccess="yes" /> 
    <errorFilter> 
     <test> 
       <regex binding="Exception.Message" pattern="(?ix: \b potentially \b.+?\b dangerous \b.+?\b value \b.+?\b detected \b.+?\b client \b)" /> 
     </test> 
    </errorFilter> 
</elmah> 
+0

我在另一个线程上找到了答案。 http://stackoverflow.com/questions/10799538/i-cant-get-my-elmah-email-filters-to-work – DanielH

回答

0

您可能缺少HTTP模块?

<httpModules> 
... 
<add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/> 
<add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/> 
... 
</httpModules> 
相关问题