我是ASP.NET的新手.我最近从我的网站设置了自动发送的电子邮件,通知我未处理的例外情况.就在几个小时前的3分钟内,有10个未处理的异常,所有堆栈跟踪都相似.我不明白的错误信息中有很多,但我不喜欢这种看法.
以下是其中一封电子邮件:
An unhandled exception occurred:
Message: Padding is invalid and cannot be removed.
Stack Trace:
at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount, Byte[]& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast)
at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[] inputBuffer, Int32 inputOffset, Int32 inputCount)
at System.Security.Cryptography.CryptoStream.FlushFinalBlock()
at System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean fEncrypt, Byte[] buf, Byte[] modifier, Int32 start, Int32 length, IVType ivType, Boolean useValidationSymAlgo)
at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Run Code Online (Sandbox Code Playgroud)
这是企图侵入我的网站或其他什么?
非常感谢那些提供答案和评论的人,这些答案和评论指出了我正确的方向来获得这个例外的答案.这可能很难确定,特别是在Web场中没有出现时.
IE 5.5没有引起我之前想到的问题.
它不容易找到,但其中一位工作人员在我的网站主持人论坛上发帖提到了Viewstate错误的报告.原因归结于asp工作进程或服务器回收.
asp worker进程设置引用machine.config文件中的processModel元素.有关详细信息,请参阅http://msdn.microsoft.com/en-us/library/7w2sway1(VS.80).aspx.
建议的修复方法是在web.config文件中设置加密的machineKey.Machine …