以下是最常见的:
填充无效,无法删除。
说明:在执行当前Web请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中的起源位置的更多信息。
Exception Details:
System.Security.Cryptography.CryptographicException:
Padding is invalid and cannot be
removed.Source Error:
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.Stack Trace:
[CryptographicException: Padding is
invalid and cannot be removed.]
System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte[]
inputBuffer,Int32 inputOffset,Int32
inputCount,Byte[]& outputBuffer,
Int32 outputOffset,PaddingMode
paddingMode,Boolean fLast) +1545747
System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte[]
inputBuffer,Int32
inputCount) +257
System.Security.Cryptography.CryptoStream.FlushFinalBlock()
+30 System.Web.Configuration.MachineKeySection.EncryptOrDecryptData(Boolean
fEncrypt,Byte[] buf,Byte[] modifier,
Int32 start,Int32 length,Boolean
useValidationSymAlgo) +164
System.Web.UI.Page.DecryptString(String
s) +83
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext
context) +148
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+358 System.Web.HttpApplication.ExecuteStep(IExecutionStep
step,Boolean& completedSynchronously)
+64
这发生在对特定WebResource.axd请求的请求。
我们看到的另一个错误是:
Validation of viewstate MAC Failed.
If this application is hosted by a Web
Farm or cluster,ensure that
configuration specifies
the same validationKey and validation
algorithm. AutoGenerate cannot be used
in a cluster. Description: An
unhandled exception occurred during
the execution of the current web
request. Please review the stack trace
for more information about the error
and where it originated in the code.Exception Details:
System.Web.HttpException: Validation
of viewstate MAC Failed. If this
application is hosted by a Web Farm or
cluster,ensure that
configuration specifies the same
validationKey and validation
algorithm. AutoGenerate cannot be used
in a cluster.
发布表单时偶尔会出现此错误。
现在在你跳进去,告诉我这个错误的明显(通常)答案,考虑这:
>应用程序部署到IIS6上的Windows Server 2003
>它不在Web场。此处仅使用一个网络服务器。
>应用程序池标识是一个自定义服务帐户,我运行aspnet_regiss -ga< username>在服务器上。没有效果。
解决方法
请检查这个更多的信息类似的情况(解释是与一个问题与viewstate验证,但原因是一样的):http://www.developmentnow.com/blog/InvalidViewstate+Or+Unable+To+Validate+Data+Error.aspx
我也一直在想知道了一段时间。在我看到这个问题后,它让我再次:Is this an attempt to break my ASP.Net site’s security? …我刚才回答与非常相同。我感觉它是一些重新启动的东西,因为当我们发布的东西,循环的应用程序的错误显示在日志中,但我没有任何其他来源说明其关系(今天我发现的情况下invalidviewstate因为机器密钥更改:))
Ps。以上最终解释它在单服务器上:)