Elmah 忽略 ErrorFilter
我试图让 elmah 忽略 404 错误,但它们不断出现。我正在使用 asp.net mvc 3。
我有
<elmah>
<errorLog type="Elmah.SqlErrorLog, Elmah" logPath="~/App_Data" connectionStringName="ConnectionString" applicationName="/" />
<errorFilter>
<test>
<equal binding="HttpStatusCode" value="404" type="Int32" />
</test>
</errorFilter>
<security allowRemoteAccess="0" />
</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>
我错过了什么吗?我使用 nuget 生成 web.config,所以我认为所有内容都在 web.config 中。
I am trying to have elmah ignore 404 errors but they keep showing up. I am using asp.net mvc 3.
I have
<elmah>
<errorLog type="Elmah.SqlErrorLog, Elmah" logPath="~/App_Data" connectionStringName="ConnectionString" applicationName="/" />
<errorFilter>
<test>
<equal binding="HttpStatusCode" value="404" type="Int32" />
</test>
</errorFilter>
<security allowRemoteAccess="0" />
</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>
Am I missing something? I used nuget to generate the web.config so I would think everything is in the web.config.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能是像这篇文章中那样的模块顺序问题?
ELMAH - 过滤 404 错误
Possibly an issue with module order like in this post?
ELMAH - Filtering 404 Errors