不带参数请求 WebResource.axd - 这是无效的 Web 资源请求
我时不时地在我的生产网站上发现这个问题,这让我完全难住了......
我的应用程序在开发和生产中都完美运行,但时不时地,我收到一封来自我的全局错误的电子邮件处理:
消息:这是一个无效的网络资源请求。
网址:/WebResource.axd
(这意味着由于某种原因,请求 webresource.axd 时未指定任何 GET 参数)
我自己没有对 webresource.axd 执行任何操作,我没有通过它获取任何资源,它仅由 .Net 自动使用服务它是验证器等的典型 JS。
知道为什么这可能会在没有参数的情况下被请求吗? 有人遇到过这种情况吗?
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:
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)
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
这绝对是一个机器人在抓取您的网站方面表现不佳。 它处理您的 Web 表单并找到对 WebResource.axd 的引用,例如:
机器人仅需要静态 JavaScript 文件,并尝试通过请求不带参数的 WebResource.axd 来下载它。 结果是 System.Web.Handlers.AssemblyResourceLoader 类抛出异常,并被 Global.asax 中的 Application_Error 拦截。
我相信这个异常是无害的——客户端会收到 404 错误。 您可以安全地忽略它。
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:
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.
I believe this exception is harmless - the client will receive 404 error. You can safely ignore it.
我们还将所有错误通过电子邮件发送给我们,我们偶尔也会收到这些错误。 他们似乎从来没有推荐人,而且用户代理通常有点古怪。 我们将它们视为机器人。
我刚刚针对 Arin 检查了几个有问题的客户端 IP,其中一个属于网络蜘蛛类型组织,所以机器人理论有更多的证据。
We also have all of our errors emailed to us, and we occasionally get those too. They never seem to have a referrer, and the user agent is usually a little wacky. We write them off as bots.
I just checked a couple of the offending client IP's against Arin, and one them belonged to a web-spidering-type organization, so there's a little more evidence for the bot theory.
我还将记录向 WebResource.axd 发出请求的用户代理。 如果是机器人爬行您的网站,我不会感到惊讶。
I would also log the useragent that made the request to WebResource.axd. It wouldn't surprise me if it was a bot crawling your site.
这次讨论...
http ://www.telerik.com/community/forums/aspnet/spell/this-is-an-invalid-webresource-request.aspx
...以及此链接的 MSDN 文章...
http://msdn.microsoft.com/en-us/magazine/cc163708.aspx
...可能会带来一些启发(尽管不多)。
This discussion...
http://www.telerik.com/community/forums/aspnet/spell/this-is-an-invalid-webresource-request.aspx
... and this linked MSDN article...
http://msdn.microsoft.com/en-us/magazine/cc163708.aspx
... might shed a little light (though not much).