无法验证数据。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Web.HttpException: 无法验证数据。
源错误:
执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。
堆栈跟踪:
[HttpException (0x80004005): 无法验证数据。]
System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +195
System.Web.UI.LosFormatter.Deserialize(String input) +60
[HttpException (0x80004005): Authentication of viewstate failed. 1) If this is a cluster, edit <machineKey> configuration so all servers use the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. 2) Viewstate can only be posted back to the same page. 3) The viewstate for this page might be corrupted.]
System.Web.UI.LosFormatter.Deserialize(String input) +117
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +102
[HttpException (0x80004005): Invalid_Viewstate
Client IP: 172.16.11.145
Port: 48961
Path: /Default.aspx.]
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +447
System.Web.UI.Page.LoadPageViewState() +18
System.Web.UI.Page.ProcessRequestMain() +447
本机上一切正常,但上传到服务器上就出现这样的问题.看了很多资料, 如果在page里加上Enableviewstatemac="false" ,由出现了"指定的转换无效"错误,请各位高手帮忙!
------解决方案--------------------------------------------------------
很简单的啊
你肯定用了什么控件在记录数据吧
让后又做了什么转换string--int之类的
viewstate不记录了,结果控件的值就为空了
当然无法验证数据
如果不Enableviewstatemac="false" 又会时间一长就
有什么viewstatemac无法验证的错误
我说的没错吧
哈哈
我遇见的太多了
------解决方案--------------------------------------------------------
帮顶
------解决方案--------------------------------------------------------
狂顶!!
------解决方案--------------------------------------------------------
类型转换问题,你看在哪行报错,细心检查下就好了
------解决方案--------------------------------------------------------