I am using Elmah for logging in a ASP.NET MVC project and I am recieving lots of 404 errors for a path /prx2.php which in turn is passing a hash as a querystring param.
I assume this is a scanner trying to find vulnerabilities. Because I am not running PHP I am safe! However I would like to stop ELmah reporting this error.
Whats the best way to exclude these types of errors from being reporting without actually creating a /prx2.php page. I also would like to do this in a config file rather than doing it progmatically.
Any ideas?
Step1: Configure config sections to include elmah
errorFilter
section:Step2: Configure the filter itself in
<elmah>
section.Step3: Include the
Elmah.ErrorFilterModule
inside your application modulesModern (IIS7+) version of including http module:
Legacy (older IIS) version of including http module:
Elmah supports error filtering - Error Filtering link
This should solve the issue for you. You can either define your filter through code - in the Global.asx file, or within the xml config for elmah itself