在web.config elmah部分添加:
<errorFilter>
<test>
<and>
<equal binding="HttpStatusCode" value="404" type="Int32" />
<regex binding="FilterSourceType.Name" pattern="mail" />
</and>
</test>
</errorFilter>
Run Code Online (Sandbox Code Playgroud)
你可以在这里找到维基:
http://code.google.com/p/elmah/wiki/ErrorFiltering