关于machine.config 中配置相导致的 invalid viewstate 问题
今天又客户说访问网站是报错,发回的信息如下
System.Web.HttpException: Invalid_Viewstate
of viewstate failed. 1) If this is a cluster, edit 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.HttpException: Unable to validate data.
at System.Web.Configuration.MachineKey.GetDecodedData(Byte[] buf, Byte[]
modifier, Int32 start, Int32 length, Int32& dataLength)
at System.Web.UI.LosFormatter.Deserialize(String input)
--- End of inner exception stack trace ---
at System.Web.UI.LosFormatter.Deserialize(String input)
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
--- End of inner exception stack trace ---
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadPageViewState()
at System.Web.UI.Page.ProcessRequestMain()
搜索了许多信息,判断可能是因为群集的问题,根据得到的信息,修改machine.config,将 validationKey 的 AutoGenerate 去掉,给为自定义的 Value
浙公网安备 33010602011771号