WebResource.axd throwing exceptions in web farm

左心房为你撑大大i 提交于 2019-12-01 11:16:47

问题


We have an array of about 12 servers serving a website. Over the past few hours, one single server has started throwing exceptions for WebResource.axd and ScriptResource.axd requests.

Exception

System.Web.HttpException - This is an invalid script resource request.

Stack Trace

at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Broken server URL

/WebResource.axd?d=S6kjkBsrIKni9uO5HCkv0c8eYObzibWXn9R6A7Yr_Fy7CW4dRFZm1HfcnUTEZ8xBYZDM-5zeTVk1tTgC1hp7d5YYw3o1&t=634308186300177825

All other servers URL

/WebResource.axd?d=yj6PW1hbOvqhMkOh2gYGlw2&t=634207187366247462

I have checked the web.config, machine.config for every server and they're all identical. The only difference been able to find so far is that prior to the problem commencing, the servers were patched, after which, the problematic server looks to be using different version of the System.Web.dll to the others?

Any ideas?


回答1:


Found the root cause of the problem. The problem server had a security patch applied which updated System.Web.dll. For some reason our hosting provider didn't update any of the other dll's and in turn this server was generating different encryption keys to the others.

To work out which dll was affected, I used the following to decrypt the webresource.axd query string parameters:

http://blogs.telerik.com/aspnet-ajax/posts/07-03-27/debugging-asp-net-2-0-web-resources-decrypting-the-url-and-getting-the-resource-name.aspx




回答2:


The "?d=yj6PW1hbOvqhMkOh2gYGlw2&t=634207187366247462" is a link somehow (hash or something?) to a resource in the system.web.dll, so understandably with different dll's on that server the link isn't valid.



来源:https://stackoverflow.com/questions/4718413/webresource-axd-throwing-exceptions-in-web-farm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!