状态信息对此页面无效,可能已损坏

时间:2010-06-22 08:32:39

标签: internet-explorer viewstate asp.net

嗨大家我在Internet Explorer中浏览我的asp.net页面时收到以下错误,而在firefox mozilla一切正常。 我尝试了不同的方法,因为我认为VIEWSTATE存在问题

 - <pages  enableViewStateMac="false" >
 - <pages enableViewState="false">
 - <pages viewStateEncryptionMode="Never">
 - <pages maxPageStateFieldLength="40">

但似乎没有任何效果。错误如下所示:

Source Error: 
    [No relevant source lines]

    Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\emportalermal\7c94fef4\cccf3353\App_Web_mtkk1qfn.6.cs    Line: 0 

    Stack Trace: 

    [FormatException: Invalid character in a Base-64 string.]
       System.Convert.FromBase64String(String s) +0
       System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +72
       System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4
       System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37
       System.Web.UI.HiddenFieldPageStatePersister.Load() +113

    [ViewStateException: Invalid viewstate. 
        Client IP: 127.0.0.1
        Port: 
        User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
        ViewState: /wEPDwUKLTk3MzIyNTg5OA9kFgJmD2QWBAIBD2QWAgIJDxYCHgRocmVmBSV+L3Byb19kcm9wbGluZV8xL3Byb19kcm9wbGluZV9pbmQuY3NzZAIDD2QWBgIDD2QWAmYPZBYGAgkPFgIeBWNsYXNzBQZhY3RpdmVkAgsPFgIfAQUGYWN0aXZlZAJBDxYCHwAFFi4uL2FsL2NvbnRhY3RQYWdlLmFzcHhkAgUPZBYKAgEPZBYYAgEPDxYCHghJbWFnZVVybAUnLi4vaW1hZ2VzL0NhdGVnb3J5SW1hZ2VzL3BhcmFwYWd1YXIuZ2lmZGQCAw8PFgQeBFRleHQFCFN0YW5kYXJkHgtOYXZpZ2F0ZVVybAUULi4vYWwvcGFnZS5hc3B4P2lkPTRkZAIFDw8WAh4HVmlzaWJsZWhkZAIHDw8WCB4IQ3NzQ2xhc3MFDmNsaWNrZWRTdWJNZW51HwMFDlN1cGVyIFJpbmlyaW5nHwQFFi4uL2FsL3BhZ2UuYXNweD9pZD05MDgeBF8hU0ICAmRkAgkPDxYCHwVoZGQCCw8PFgIfBWhkZAINDw8WAh8CBSguLi9pbWFnZXMvQ2F0ZWdvcnlJbWFnZXMvbWUga29udHJhdGUuZ2lmZGQCDw8PFgQfAwUETGlmZR8EBRUuLi9hbC9wYWdlLmFzcHg/aWQ9NTBkZAIRDw8WBB8DBQZMaWZlICsfBAUVLi4vYWwvcGFnZS5hc3B4P2lkPTk2ZGQCEw8PFgQfAwUHTGlmZSA2MB...]

    [HttpException (0x80004005): The state information is invalid for this page and might be corrupted.]
       System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +106
       System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState) +14
       System.Web.UI.HiddenFieldPageStatePersister.Load() +217
       System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +105
       System.Web.UI.Page.LoadAllState() +43
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
       System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
       System.Web.UI.Page.ProcessRequest() +80
       System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
       System.Web.UI.Page.ProcessRequest(HttpContext context) +49
       ASP.al_page_aspx.ProcessRequest(HttpContext context) in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\emportalermal\7c94fef4\cccf3353\App_Web_mtkk1qfn.6.cs:0
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

任何建议。请记住,错误只出现在Internet Explorer中

1 个答案:

答案 0 :(得分:0)

真的找不到解决方法。所以我用ajax标签替换了jquery标签,现在一切都在两种浏览器中都很完美。

当然不是最好的解决方案,而是工作一个:)