【发布时间】:2010-12-07 12:20:43
【问题描述】:
我有一个 C# 移动站点,但某些移动客户端存在问题。我在下面发布了一条跟踪信息,但基本上是手机浏览器或手机连接到互联网 url 的 wap 网关对表单中的视图状态隐藏输入进行编码。
/wEPDwULLTExNTMyOTcwOTBkGAEFBlBtTGlzdA9nZA==
变成
%2FwEPDwULLTExNTMyOTcwOTBkGAEFBlBtTGlzdA9nZA%3D%3D
所以视图状态失败。
在处理之前是否有覆盖和 urldecode 视图状态信息?
System.Web.HttpException:此页面的状态信息无效并且可能已损坏。 ---> System.Web.UI.ViewStateException:无效的视图状态。 客户端 IP:65.91.116.34 端口:37172 用户代理:SCH-R430 UP.Browser/6.2.3.8 (GUI) MMP/2.0 视图状态:%2FwEPDwULLTExNTMyOTcwOTBkGAEFBlBtTGlzdA9nZA%3D%3D 推荐人: 路径:/mobile/Inbox.aspx ---> System.FormatException:Base-64 字符串中的无效字符。 在 System.Convert.FromBase64String(String s) 在 System.Web.UI.ObjectStateFormatter.Deserialize(字符串输入字符串) 在 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(字符串序列化状态) 在 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter 格式化程序,字符串序列化状态) 在 System.Web.UI.HiddenFieldPageStatePersister.Load() --- 内部异常堆栈跟踪结束 --- --- 内部异常堆栈跟踪结束 --- 在 System.Web.UI.ViewStateException.ThrowError(异常内部,字符串 persistedState,字符串 errorPageMessage,布尔 macValidationError) 在 System.Web.UI.ViewStateException.ThrowViewStateError(异常内部,字符串持久状态) 在 System.Web.UI.HiddenFieldPageStatePersister.Load() 在 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() 在 System.Web.UI.Page.LoadAllState() 在 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest() 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext 上下文) 在 System.Web.UI.Page.ProcessRequest(HttpContext 上下文) 在 ASP.mobile_inbox_aspx.ProcessRequest(HttpContext 上下文) 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,Boolean& completedSynchronously)【问题讨论】:
-
(删除了我的答案,因为我没有发现“viewstate”位)
标签: c# .net asp.net viewstate base64