我在從dropdownlist回發時收到此異常。 注意:Dropdownlist與BigInt綁定爲一個值類型,並在usercontrol中。 當我在下拉列表中選擇值我得到這個異常:錯誤:此頁面的狀態信息無效,可能已損壞
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\074f73f4\bcce5747\App_Web_j32tj0nd.0.cs Line: 0
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +9594283
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +119
System.Convert.ToInt32(String value, IFormatProvider provider) +48
System.Web.UI.Page.get_RequestViewStateString() +245
[ViewStateException: Invalid viewstate.
Client IP: ::1
Port: 2479
Referer: http://localhost:89//home.aspx?catid=8
Path: /home.aspx
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.18) Gecko/20110614 AskTbPTV2/3.12.2.16749 Firefox/3.6.18 GTB7.1
ViewState: ]
[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) +198
System.Web.UI.ViewStateException.ThrowViewStateError(Exception inner, String persistedState) +14
System.Web.UI.Page.get_RequestViewStateString() +567
System.Web.UI.HiddenFieldPageStatePersister.Load() +241
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.home_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\074f73f4\bcce5747\App_Web_j32tj0nd.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
我已經做了谷歌和嘗試很多事情,如:在webconfig :
<pages maxPageStateFieldLength="40"
和
ValidateRequest="false"
但沒有解決方案。
請專家給我解答。從最近幾個小時我面臨這個問題,早些時候它工作正常。
編輯:注意:我已經測試過,發現UC在其他頁面「測試頁」上工作正常。我認爲這一定是與一些事情衝突...請建議..
請參閱我的答案的解釋。 – VinayC