验证视图状态MAC失败。在LOCALHOST调试

时间:2014-11-01 15:57:19

标签: c# asp.net

这是错误:

Server Error in '/' Application.

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.

See http://go.microsoft.com/fwlink/?LinkID=314055 for more information.

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.

See http://go.microsoft.com/fwlink/?LinkID=314055 for more information.

Source Error: 


[No relevant source lines]

Source File: c:\Users\bugnuker\AppData\Local\Temp\Temporary ASP.NET Files\root\771d6925\611b9777\App_Web_dgowrw1y.1.cs    Line: 0 

Stack Trace: 


[ViewStateException: Invalid viewstate.     Client IP: ::1  Port: 1121  Referer: http://localhost:57816/Login   Path: /Login    User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36   ViewState: JPfkUk+QP/buQafjKxZm8yi572DS6/obP0Cr4ssy46v6WPqlUOh7v4r6tpUcA06p/I1TFpKjfk8lhoqM6zWrxpa7GwAlRT7CpyBk/jQ+6JYK1LlC/f03x04r6miYG0uohqA3f8L5AvBUFBeG5E5IWvBp3g6RjWAhXyv/NJvbzJZjdp7Qjm6DUEdnbbz8ewYW1dI4+Q==]

该项目几个月来一直运作良好。突然之间,截至今天早上,我收到了这个错误。

我已将机器密钥添加到Web配置中以试用它,但我使用的是Visual Studio调试器(IIS Express),但仍然出现错误。我发布到托管服务时仍然会收到错误消息。

我在全局搜索过,在localhost调试中找不到任何相关内容。每个解决方案都是关闭MACValidation - 我没有这样做 - 或者添加web.config machineKey元素,而且我没有成功。

如果有人有任何想法,我会全力以赴。

0 个答案:

没有答案