消息:对viewstate MAC的验证失败。如果这个应用程序是 由Web场或群集托管, 确保配置指定 相同的validationKey和验证 算法。无法使用AutoGenerate 在群集中。资料来源:System.Web Inner 例外:System.Web.UI.ViewStateException: 视图状态无效。客户IP: 80.79.116.251端口:59340用户代理:Mozilla / 4.0(兼容; MSIE 7.0b; Windows NT 6.0)
ViewState: / wEPDwUKLTE1OTMzNjIxOQ9kFgJmD2QWAgIDD2QWBAIHD2QWBAIBDxYCHgdWaXNpYmxlaGQCAw8WAh8AZ2QCDw9kFgQCAw88KwAJAQAPFgQeCERhdGFLZXlzFgAeC18hSXRlbUNvdW50AjJkFmRmD2QWAgIBDw8WBh4HVG9vbFRpcAUUQ2FyIFNhbGVzIGluIEFsYWJhbWEeC05hdmlnYXRlVXJsBQ5 + L0FsYWJhbWEuYXNweB4EVGV4dAUCQUxkZAIBD2QWAgIBDw8WBh8DBRNDYXIgU2FsZXMgaW4gQWxhc2thHwQFDX4vQWxhc2thLmFzcHgfBQUCQUtkZAICD2QWAgIBDw8WBh8DBRRDYXIgU2FsZXMgaW4gQXJpem9uYR8EBQ5 + L0FyaXpvbmEuYXNweB8FBQJBWmRkAgMPZBYCAgEPDxYGHwMFFUNhciBTYWxlcyBpbiBBcmthbnNhcx8EBQ9 + L0Fya2Fuc2FzLmFzcHgfBQUCQVJkZAIED2QWAgIBDw8WBh8DBRdDYXIgU2FsZXMgaW4gQ2FsaWZvcm5pYR8EBRF + L0NhbGlmb3JuaWEuYXNweB8FBQJDQWRkAgUPZBYCAgEPDxYGHwMFFUNhciBTYWxlcyBpbiBDb2xvcmFkbx8EBQ9 + L0NvbG9yYWRvLmFzcHgfBQUCQ09kZAIGD2QWAgIBDw8WBh8DBRhDYXIgU2FsZXMgaW4gQ29ubmVjdGljdXQfBAUSfi9Db25uZWN0aWN1dC5hc3B4HwUFAkNUZGQCBw9kFgICAQ8PFgYfAwUVQ2FyIFNhbGVzIGluIERlbGF3YXJlHwQFD34vRGVsYXdhcmUuYXNweB8FBQJERWRkAggPZBYCAgEPDxYGHwMFIUNhciBTYWxlcyBpbiBE ...
System.Web.UI.ViewStateException.ThrowError上的堆栈跟踪:(例外 inner,String persistedState,String errorPageMessage,布尔值 macValidationError)at System.Web.UI.ViewStateException.ThrowMacValidationError(例外 inner,String persistedState)at System.Web.UI.ObjectStateFormatter.Deserialize(字符串 inputString)at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(字符串 serializedState)at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter,String serializedState)at System.Web.UI.HiddenFieldPageStatePersister.Load() 在 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() 在System.Web.UI.Page.LoadAllState() 在 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)at System.Web.UI.Page.ProcessRequest(布尔 includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)at System.Web.UI.Page.ProcessRequest()at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext的 上下文) System.Web.UI.Page.ProcessRequest(HttpContext的 上下文) ASP.login_aspx.ProcessRequest(HttpContext的 上下文) C:\ WINDOWS \ Microsoft.NET \框架\ V2.0.50727 \临时 ASP.NET 文件\ ROOT \ 79794658 \ 835d6695 \ App_Web_h5zykaqc.25.cs:行 0点 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步,布尔& completedSynchronously)
我尝试了本文中的建议解决方案http://blogs.msdn.com/b/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx 继承自BasePage类,但我偶尔会遇到错误。
我正在使用母版页和内容页面,因此内容页面继承自BasePage类。 也许有人建议其他工作解决方案?