Elmah报告不需要的404错误 [英] Elmah reporting unwanted 404 errors

查看:119
本文介绍了Elmah报告不需要的404错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Elmah登录ASP.NET MVC项目,并且在/prx2.php路径中收到很多404错误,而该错误又将哈希作为查询字符串参数传递.

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.

我认为这是一台试图查找漏洞的扫描程序.因为我没有运行PHP,所以我很安全!但是,我想停止ELmah报告此错误.

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.

什么是在不实际创建/prx2.php页面的情况下从报告中排除这些类型的错误的最佳方法.我也想在配置文件中执行此操作,而不是通过编程的方式进行操作.

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.

有什么想法吗?

推荐答案

Elmah支持错误过滤-错误过滤链接

Elmah supports error filtering - Error Filtering link

这应该可以为您解决问题.您可以通过代码定义过滤器-在Global.asx文件中,或在Elmah本身的xml配置中

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

这篇关于Elmah报告不需要的404错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆