错误日志 记录如下信息:
System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.Web.HttpException: 无效的视图状态。
在 System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)
在 System.Web.UI.Page.DecryptString(String s)
--- 内部异常堆栈跟踪的结尾 ---
在 System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
在 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
在 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
在 System.Web.Handlers.ScriptResourceHandler.DecryptString(String s)
在 System.Web.Handlers.ScriptResourceHandler.DecryptParameter(NameValueCollection queryString)
在 System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context)
在 System.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)不知道哪里出现问题!
System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.Web.HttpException: 无效的视图状态。
在 System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType)
在 System.Web.UI.Page.DecryptString(String s)
--- 内部异常堆栈跟踪的结尾 ---
在 System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
在 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
在 System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
在 System.Web.Handlers.ScriptResourceHandler.DecryptString(String s)
在 System.Web.Handlers.ScriptResourceHandler.DecryptParameter(NameValueCollection queryString)
在 System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context)
在 System.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)不知道哪里出现问题!
在 <machineKey> 里面指定一个算法吧,不然就直接不验证ViewState了:
<pages enableEventValidation="false" viewStateEncryptionMode ="Never" />
在web.config这么弄。
如果你的ViewState加密是需要的,那就要指定算法了。
Auto那个好像总出问题,具体的也不太清楚。