Keynote KITE and ASP.NET Viewstate
Just had the classic ViewSta开发者_如何学编程te exception on a live site - "Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. ---> System.Web.UI.ViewStateException: Invalid viewstate."
This is a two server, load balanced environment and we'd set the <machineKey>
in web.config on both machines???
The exception we get details the user agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; KTXN) - which I believe is the Keynote KITE agent. The problems specifically seems to be that the ViewState is being truncated in requests form this client - anyone seen this before?
Cheers
Is it possible that the user agent could have been behind a firewall that truncated the ViewState? Rex Lin mentions that possibility in this thread, along with a solution based on splitting up the ViewState into separate fields.
Another approach would be to implement server-side ViewState as suggested by @Nissan Fan here: Proxy server truncating View State
Neither of which strictly answer the question, but may remove the underlying problem.
精彩评论