填充无效,无法被移除(Padding is invalid and cannot be removed)
2006-12-31 09:43
495 查看
这里在使用asp.net ajax的程序发布后经常出现的一个异常情况。其实早在使用atlas时,就已经出现了这个异常了,只是那时并没有非常频繁的出现,也就是在程序启动后规律性的出现几次后就不发生了。由于不影响整个程序的正常运行也就没有关注了。但是在更新到asp.net ajax beta2版本后,并且使用了泛解析使用二级域名后就经常出错了,而且有几个规律:
1.在所有看到这个异常的邮件中,查看到的IP都是google的访问。而没有其它的用户,甚至是搜索引擎。
2.在出错的地方大部分是用二级域名访问资源路径:如 http://*.*.com/ScriptResource.axd?d=42zFeGddIOG6Ha39Bm22fyspDkNNAkCyiJm0F-kHdJ6O7yOwanGTbMYrJ6yzzZzUmROqn-J-NAWN5_V3qQJ90iV1TUiF-c0EYaTG7q-FEduJI7Emddi3XbvRgK-wH9VD0&t=632997086300000000
3.在分析的几个查询参数都不一样(d,t),照理说,要获得相同的脚本路径应用是使用相同的查询参数的啊。
简单分析:从目前获取的一些信息可以表明,这是由于google在访问了不存在的脚本资源出现的加密错误。可是它是怎么得到这些不存在的脚本资源路径的呢?为什么正常访问的用户不会出错呢?目前还没有自己得到很好的解释。
发布环境:asp.net ajax beta2,使用了UrlRewrite,Release version Assembly,没有限制ScriptResorce.axd的表单访问权限,web.config的debug=false 。
虽不影响正常运行,但为了随时了解程序的运行情况,我开启了healthmoniter,现在邮箱都快被填爆了。
如果您也有出现过类似异常,欢迎讨论。如果您已解决过类似异常,还请指教。
附上异常信息:
异常详细信息: System.Security.Cryptography.CryptographicException: 填充无效,无法被移除。
源错误:
堆栈跟踪:
[/code]
1.在所有看到这个异常的邮件中,查看到的IP都是google的访问。而没有其它的用户,甚至是搜索引擎。
2.在出错的地方大部分是用二级域名访问资源路径:如 http://*.*.com/ScriptResource.axd?d=42zFeGddIOG6Ha39Bm22fyspDkNNAkCyiJm0F-kHdJ6O7yOwanGTbMYrJ6yzzZzUmROqn-J-NAWN5_V3qQJ90iV1TUiF-c0EYaTG7q-FEduJI7Emddi3XbvRgK-wH9VD0&t=632997086300000000
3.在分析的几个查询参数都不一样(d,t),照理说,要获得相同的脚本路径应用是使用相同的查询参数的啊。
简单分析:从目前获取的一些信息可以表明,这是由于google在访问了不存在的脚本资源出现的加密错误。可是它是怎么得到这些不存在的脚本资源路径的呢?为什么正常访问的用户不会出错呢?目前还没有自己得到很好的解释。
发布环境:asp.net ajax beta2,使用了UrlRewrite,Release version Assembly,没有限制ScriptResorce.axd的表单访问权限,web.config的debug=false 。
虽不影响正常运行,但为了随时了解程序的运行情况,我开启了healthmoniter,现在邮箱都快被填爆了。
如果您也有出现过类似异常,欢迎讨论。如果您已解决过类似异常,还请指教。
附上异常信息:
填充无效,无法被移除。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息: System.Security.Cryptography.CryptographicException: 填充无效,无法被移除。
源错误:
执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。
堆栈跟踪:
[code][CryptographicException: 填充无效,无法被移除。] System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) +1489116 System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount) +306 System.Security.Cryptography.CryptoStream.FlushFinalBlock() +30 System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Boolean useValidationSymAlgo) +154 System.Web.UI.Page.DecryptString(String s) +79 [TargetInvocationException: 调用的目标发生了异常。] System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +358 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +17 Microsoft.Web.Handlers.ScriptResourceHandler.DecryptString(String s) +185 Microsoft.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) +325 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
[/code]
相关文章推荐
- 填充无效,无法被移除(Padding is invalid and cannot be removed)
- Padding is invalid and cannot be removed. 一直提示这个 怎么解决?
- Padding is invalid and cannot be removed
- 异常CryptographicException: "Padding is invalid and cannot be removed."的原因
- Padding is invalid and cannot be removed 解决方法
- 二级域名共享Cookie时碰到的问题:Padding is invalid and cannot be removed
- Padding is invalid and cannot be removed
- U8v10.1 启动系统管理出现padding is invalid and can't be removed问题的解决方法
- Eclipse:xxxx is required and cannot be removed from the server
- 项目名 is required and cannot be removed from the server解决
- ORA-20003: ORU-10036: object XXX is invalid and cannot be described
- SharePoint中excel file无法打开,弹出"The file is corrupted and cannot be opened"的解决方案
- java.lang.SecurityException: Filter of class org.apache.catalina.ssi.SSIFilter is privileged and cannot be loaded by this web application
- 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
- assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
- 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
- Cannot connect to WMI provider.You do not have permission or the server is unreachable.Note that you can only manager SQL Server 2005 and later version with SQL Server Configuration Manager.Invalid namespace [0x8004100e]
- 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
- 关于Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.的问题
- Error occurred in deployment step 'Activate Features': Feature with Id '{GUID}' is not installed in this farm, and cannot be added to this scope.