问题描述
我时不时地在我的生产网站上发现这个问题,这绝对让我很困惑...
I'm finding this problem every now and then in my production website, and it has me absolutely stumped...
我的应用程序在开发和生产中均能完美运行,但是时不时地,我从全局错误处理中收到一封电子邮件,内容如下:
My app works perfectly in both dev and production, but every now and then, I get an e-mail from my global error handling with this:
消息:这是无效的网络资源请求.
网址:/WebResource.axd
(这意味着出于某种原因,在未指定任何GET参数的情况下请求了webresource.axd)
MESSAGE: This is an invalid webresource request.
URL: /WebResource.axd
(which means that for some reason webresource.axd was requested without specifying any GET parameters)
我本人对webresource.axd并没有做任何事情,我无法通过它获取任何资源,.Net只会自动使用它来为验证器提供典型的JS等.
I'm not doing anything with webresource.axd myself, I don't get any of my resources through it, it's only used automatically by .Net to serve it's typical JS for validators, etc.
有人知道为什么没有参数可能会要求它吗?有人遇到过吗?
Any idea why this might be getting requested without parameters?Has anyone encountered this?
推荐答案
这肯定是一个机器人,在抓取您的网站方面做得不好.它处理您的Web表单并找到对WebResource.axd的引用,例如:
That definitely is a bot not doing very good job of crawling your web site. It processes your web form and locates reference to WebResource.axd, for example:
<script src="/site/WebResource.axd?d=MtIW_TBRtZCvAXDMJGwg4g2&t=633772897740666651" type="text/javascript"></script>
该机器人只希望使用静态JavaScript文件,并通过请求不带参数的WebResource.axd尝试下载该文件.结果是System.Web.Handlers.AssemblyResourceLoader类抛出异常,并在Global.asax中被Application_Error拦截.
The bot expects static JavaScript files only and tries to download it by requesting WebResource.axd without parameters. The result is an exception thrown by System.Web.Handlers.AssemblyResourceLoader class and intercepted by Application_Error in Global.asax.
我认为此异常是无害的-客户端将收到404错误.您可以放心地忽略它.
I believe this exception is harmless - the client will receive 404 error. You can safely ignore it.
这篇关于没有参数的WebResource.axd请求-这是无效的Webresource请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!