2010-11-03 100 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