问题描述
The state information is invalid for this page and might be corrupted.
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: The state information is invalid for this page and might be corrupted.
Source Error:
[No relevant source lines]
Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f4f89c16\5236afcd\App_Web_s1zzmga4.0.cs Line: 0
Stack Trace:
[FormatException: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters. ]
System.Convert.FromBase64String(String s) +0
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +77
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() +147
[ViewStateException: Invalid viewstate.
Client IP: 10.12.0.12
Port: 61684
Referer: http://npidev.fender.com:91/ProjectDetail.aspx?id=1
Path: /ProjectDetail.aspx
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0)
ViewState: /wEPDwUKLTgxNzUyOTY1OA8WBh4JUFJPSkVDVElEBQExHg1ERUxFVEVEX05PVEVTMs0BAAEAAAD/////AQAAAAAAAAAEAQAAAH5TeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW1N5c3RlbS5JbnQzMiwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0DAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lvbgcAAAgICAkCAAAAAAAAAAAAAAAPAgAAAAAAAAAICx4RREVMRVRFRF9SRVNPVVJDRVMyzQEAAQAAAP////8BAAAAAAAAAAQBAAAAflN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLkludDMyLCBtc2NvcmxpYiwgVmVyc2lvbj00LjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODldXQMAAAAGX2l0ZW1zBV9zaXplCF92ZXJzaW9uBwAACAgICQIAAAAAAAAAAAAAAA8CAAAAAAAAAAgLFgJmD2QWAgIDD2QWBAIBD2QWAmYPZBYCAgEPFgIeBFRleHQFBkplcmVteWQCBQ9kFgpmD2QWBgIDDw8WBB4IQ3NzQ2xhc3MFEXByb2plY3RzIHNlbGVjdGVkHgRfIVNCAgJkZAIXD2QWAmYPDxYCHwMFA1Im...]
[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) +235
System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState) +14
System.Web.UI.HiddenFieldPageStatePersister.Load() +251
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +106
System.Web.UI.Page.LoadAllState() +43
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +8431
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +253
System.Web.UI.Page.ProcessRequest() +78
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.projectdetail_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\f4f89c16\5236afcd\App_Web_s1zzmga4.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
我的尝试:
我试过以下链接
http://renditionprotocol.blogspot.in/2007/01/state-information-is -invalid-for-this.html
http://forums.asp.net/t/998293.aspx?System+Web+HttpException+The+state+information+is+invalid+for+这个+页面+和+可能+被+损坏
没有得到任何解决方案请给出解决方案。
What I have tried:
I tried below links
http://renditionprotocol.blogspot.in/2007/01/state-information-is-invalid-for-this.html
http://forums.asp.net/t/998293.aspx?System+Web+HttpException+The+state+information+is+invalid+for+this+page+and+might+be+corrupted
not getting solution any one please give solution.
推荐答案
protected override object LoadPageStateFromPersistenceMedium()
{
return Session["_ViewState"];
}
protected override void SavePageStateToPersistenceMedium(object viewState)
{
Session["_ViewState"] = viewState;
}
< / script>
< form runat =server>
<输入类型=隐藏名称= __ VIEWSTATE>
< / form>
</script>
<form runat="server">
<input type=hidden name=__VIEWSTATE>
</form>
这篇关于在IIS中托管ASP.NET应用程序时获取以下错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!