“视图状态 MAC 验证失败”问题,没有负载平衡、集群或服务器场
这是我们在许多网站上遇到的一个特别无益且困难的问题。这些都是相当高流量且复杂的站点,但它们都在一个盒子上 - 没有负载平衡或网络场。可靠地重现非常困难,但任何有关潜在修复的想法将不胜感激。
需要强调的是,该问题的发生非常间歇性(可能是百分之一?),在这个阶段,我无法隔离网站上导致问题的任何特定操作。
我们能想到的唯一真正的解决方案是将站点转换为 MVC,但正如您可以想象的那样,这是一项非常艰巨的任务。
站点是用 .NET3.5 构建的,显然是基于 Web 表单的,托管在运行 Windows Server 2008 标准、32 位、IIS7 的机器上,应用程序池在“经典”模式下运行。
This is a particularly unhelpful and difficult issue that we're experiencing with a number of sites. These are reasonably high-traffic and complex sites, but they're all on the one box - there's no load-balancing or web farm going on. It's very hard to reliably reproduce but any ideas about potential fixes would be appreciated.
Just to emphasise, the problem happens very intermittently (maybe 1 in a 100?) and at this stage I can't isolate any particular action on the site causing the problem.
The only genuine solution we can think of is converting the sites to MVC, but as you can imagine this is a really big task.
Sites are built in .NET3.5, are obviously web forms based, hosted on a box running Windows Server 2008 standard, 32-bit, IIS7, application pools runing in 'Classic' mode.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,我可以通过长时间保留登录表单然后填写表单并点击提交来重现此错误。在搜索“viewstate expire”并阅读更多内容后,我尝试在 Web.config 中手动设置该元素。
要添加到 Web.config 文件的特定元素是:
validationKey
和decryptionKey
属性中的值只是随机生成的十六进制数字,但需要恰好是 128 和 64分别为字节。OK, I was able to reproduce this error by leaving the login form for a long time then filling in the form and hitting submit. After searching for 'viewstate expire' and reading around a bit more I've had a go at manually setting the element in my Web.config.
The specific element to add to your Web.config file is:
The values in the
validationKey
anddecryptionKey
attributes are just randomly generated hex numbers, but need to be exactly 128 and 64 bytes respectively.