2010-11-03 103 views
0

我们最近将所有站点从一台服务器(IIS6)移动到一台新服务器(IIS7),该服务器还涉及更改所有DNS记录。然而,在一些网站,当你在某个页面后回,您会收到以下错误:视图状态MAC验证失败

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. 

起初我以为这可能是一个传播史争论的位置(即它的努力。回发到旧服务器)。但是,DNS记录在2周前已更改,所以肯定不会如此。

为什么会发生此错误?

可能值得注意的是,旧的服务器上从未发生过此错误。

回答

1

这可能是一个与asp.net-2.0相关的错误。您使用的是哪个版本 - 该错误已在SP2中修复。

+0

将在服务器上安装.NET 4.0包括此?我们目前有.NET 3.5 – Curt 2010-12-13 09:27:00

+0

只要你有最新的版本和补丁,它也应该可以使用3.5。 (假设这是问题,那就是) – blueberryfields 2010-12-13 14:19:46

+0

我已经研究过这个,看来你需要.NET 3.5 SP1 for .NET 2.0 SP2。我们已经更新到.NET 4.0,我们不再收到错误!谢谢 – Curt 2010-12-13 15:53:35