首页 > 开发遇到的问题 > ViewStateException: Invalid viewstate.
2012六月25

ViewStateException: Invalid viewstate.

错误明细:
详细错误:
System.Web.UI.ViewStateException: Invalid viewstate. Client IP: 192.168.21.184 Port: 1418 Referer: http://192.168.16.55:888/Increment/PersonalCustomer.aspx?type=developcall&MenuID=508&menuname=发展部客户跟进 Path: /Increment/PersonalCustomer.aspx User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) ViewState: /wEPDwUJMzIwOTI4NzM3D2QWAgIBD2QWAgIBDw8WAh4EVGV4dAVJ57O757uf5bey6Ieq5Yqo6YCa55+l5oqA5pyv6YOo5aSE55CGLOivt+eojeWQjuiuv+mXriEgIC0tMjAxMi0wNi0yNSAwODoyOGRkZP1AV1Xh2GYIxvsOtpTpoN+mHmQzbqafkrv3eZ/waeQN,/wEPDwUJMzIwOTI4NzM3D2QWAgIBD2QWAgIBDw8WAh4EVGV4dAVJ57O757uf5bey6Ieq5Yqo6YCa55+l5oqA5pyv6YOo5aSE55CGLOivt+eojeWQjuiuv+mXriEgIC0tMjAxMi0wNi0yNSAwODoyOGRkZP1AV1Xh2GYIxvsOtpTpoN+mHmQzbqafkrv3eZ/waeQN,/wEPDwUKMTg1MDQyMjI5Nw9kFgICAw9kFgICAw9kFgJmD2QWDgIHDxBkEBUHDOivt+mAieaLqS4uLg/mlrDlrqLmiLfotYTmlpkKQeexu+WuouaItwpC57G75a6i5oi3CkPnsbvlrqLmiLcKROexu+WuouaItwzlj5bmtojorqLljZUVBwAOYXV0b2Rpc3RyaWJ1dGUJc3Ryb25nYnV5CWludGVuZGJ1eQh0aGlua2J1eQdpc3ZhbGlkBmNhbmNlbBQrAwdnZ2dnZ2dnZGQCCQ8QZGQWAGQCDQ8QZBAVCwotLeaJgOaciS0tCeaXoOS6uuaOpQnp… —> System.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.

原因:页面中含有多个_VIEWSTATE引起,导致此错误。
解决方法:禁用某一页面的viewstate.
 方法:1)page上加EnableViewState="false" 2)去掉form的runat=server

本文地址:http://enjoyasp.net/?p=2223 , 转载请保留.

本文的评论功能被关闭了.