希望添加有关此问题的更多详细信息以及一些搜索词!
该问题表现为对 WebResource.axd 和 ScriptResource.axd 的请求的 ASP.Net 错误,例如:
http//mysite/MyApplication/WebResource.axd?d=966IInUloJ...&t=6332662...
这将导致以这种方式交付的图像、脚本、样式表和其他资源失败。您会注意到查询字符串上的“d”参数在您的某些主机上会有所不同,尽管它们具有相同的validationKey 等...一旦修复,您可以在所有主机上测试相同的查询字符串。
“/MyApplication”应用程序中的服务器错误。
要解密的数据长度无效。
说明:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。
异常详细信息: System.Security.Cryptography.CryptographicException:要解密的数据长度无效。
源错误:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
堆栈跟踪:
[CryptographicException: Length of the data to decrypt is invalid.]
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) +7588941
System.Security.Cryptography.CryptoStream.FlushFinalBlock() +33
System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo) +225
System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType) +85
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +179
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
版本信息: Microsoft .NET Framework 版本:2.0.50727.5653;ASP.NET 版本:2.0.50727.4444
在 Windows 事件日志中,您可能会看到以下错误:
事件类型:警告
事件源:ASP.NET 2.0.50727.0
活动类别:网络活动
事件编号:1309
日期:2011 年 5 月 23 日
时间:下午 3:31:13
用户:不适用
电脑:我的主机
描述:
事件代码:3005
事件消息:发生未处理的异常。
活动时间:5/23/2011 3:31:13 PM
活动时间(UTC):5/23/2011 7:31:13 AM
事件 ID:a66bd05b39c34da6bc3bfd349aefdf24
事件顺序:71
事件发生:21
事件详细代码:0
应用信息:
应用域:/LM/W3SVC/98/Root/MyApplication...
信任级别:完全
应用程序虚拟路径:/MyApplication
应用程序路径:d:\inetpub\mysite\MyApplication\
机器名称:MYHOST
处理信息:
进程号:15328
进程名称:w3wp.exe
帐户名称:NT AUTHORITY\NETWORK SERVICE
异常信息:
异常类型:CryptographicException
异常消息:要解密的数据长度无效。
索取资料:
请求网址:http://mysite/MyApplication/ScriptResource.axd?d=...&t=...
请求路径:/MyApplication/ScriptResource.axd
用户主机地址:1.1.1.1
用户:
是否经过身份验证:假
认证类型:
线程帐户名称:NT AUTHORITY\NETWORK SERVICE
线程信息:
线程 ID:9
线程帐户名称:NT AUTHORITY\NETWORK SERVICE
是否冒充:假
堆栈跟踪:在 System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
在 System.Security.Cryptography.CryptoStream.FlushFinalBlock()
在 System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(布尔 fEncrypt,Byte[] buf,Byte[] 修饰符,Int32 开始,Int32 长度,IVType ivType,布尔 useValidationSymAlgo)
在 System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)
在 System.Web.UI.Page.DecryptString(String s)
有问题的更新是MS10-070。即使您的主机认为它已安装,您也可能需要重新安装它以修复随后更改的库或其他东西。
此更新中值得注意的是KB2431728 - ASP.NET 中的加密内容未解密或导致使用持久表单身份验证 cookie 或部署在网络场中的网站出错- 请参阅详细信息。
Web 场中的某些服务器或应用程序可能会遇到以下一种或多种症状:... WebResource 或 ScriptResource 处理程序中的异常
...
公告 MS10-070 (http://www.microsoft.com/technet/security/bulletin/ms10-070.mspx) 解决的安全更新更改了 ASP.NET 中加密的默认行为。
...
在网络场中为 ASP.NET 网站提供服务的所有服务器都必须安装安全更新。如果某些服务器没有安装安全更新,您必须将更新应用到这些服务器。