问题描述
验证视图状态MAC失败。如果此应用程序由网络场或群集承载,请确保<machineKey>配置指定了相同的validationKey和验证算法。不能在群集中使用AutoGenerate。说明:执行当前Web请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息:System.Web.HttpException:验证视图状态MAC失败。如果此应用程序由网络场或群集承载,请确保<machineKey>配置指定了相同的validationKey和验证算法。不能在群集中使用AutoGenerate。源错误:[没有相关的源行]源文件:c:WINDOWSMicrosoft.NETFrameworkv2.0.50727TemporaryASP.NETFilesroot4e5be8715c2ec4edApp_Web_rl2k-qt2.2.cs行:0堆栈跟踪:[ViewStateException:无效的视图状态。ClientIP:127.0.0.1Port:User-Agent:Mozilla/4.0(compatible;MSIE8.0;WindowsNT5.1;Trident/4.0;.NETCLR2.0.50727;.NETCLR3.0.04506.648;.NETCLR3.5.21022;.NETCLR3.0.4506.2152;.NETCLR3.5.30729;.NETCLR1.1.4322)ViewState:/wEPDwUKMjEwOTU0OTEzM2RkrzPiFStOuehv6Gff+Ngpu7u+nwY=Referer:http://localhost:18461/indexT.aspx#Path:/OrderManage/AddOrder.aspx][HttpException(0x80004005):验证视图状态MAC失败。如果此应用程序由网络场或群集承载,请确保<machineKey>配置指定了相同的validationKey和验证算法。不能在群集中使用AutoGenerate。]System.Web.UI.ViewStateException.ThrowError(Exceptioninner,StringpersistedState,StringerrorPageMessage,BooleanmacValidationError)+106System.Web.UI.ViewStateException.ThrowMacValidationError(Exceptioninner,StringpersistedState)+14System.Web.UI.ObjectStateFormatter.Deserialize(StringinputString)+237System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(StringserializedState)+4System.Web.UI.Util.DeserializeWithAssert(IStateFormatterformatter,StringserializedState)+37System.Web.UI.HiddenFieldPageStatePersister.Load()+207System.Web.UI.Page.LoadPageStateFromPersistenceMedium()+105System.Web.UI.Page.LoadAllState()+43System.Web.UI.Page.ProcessRequestMain(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint)+6785System.Web.UI.Page.ProcessRequest(BooleanincludeStagesBeforeAsyncPoint,BooleanincludeStagesAfterAsyncPoint)+242System.Web.UI.Page.ProcessRequest()+80System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContextcontext)+21System.Web.UI.Page.ProcessRequest(HttpContextcontext)+49ASP.ordermanage_addorder_aspx.ProcessRequest(HttpContextcontext)inc:WINDOWSMicrosoft.NETFrameworkv2.0.50727TemporaryASP.NETFilesroot4e5be8715c2ec4edApp_Web_rl2k-qt2.2.cs:0System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()+181System.Web.HttpApplication.ExecuteStep(IExecutionStepstep,Boolean&completedSynchronously)+75
解决方案
解决方案二:
写了一个添加页面,点保存执行insert语句,会报这样的错误,求解释啊,谢谢啊