gpt4 book ai didi

c# - 如何修复 asp.net 应用程序中的 MAC 错误?

转载 作者:行者123 更新时间:2023-11-30 18:42:54 25 4
gpt4 key购买 nike

我有一个 ASP.NET 应用程序,一切正常,但几分钟后,当我单击一个按钮时,出现此错误:

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that 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 configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

我该如何解决这个问题?

最佳答案

这篇博文对此进行了相当详细的介绍:
http://www.eukhost.com/forums/f15/fix-validation-viewstate-mac-failed-6085/

过去我用过这种方法:

  <system.web>
<pages enableViewStateMac="false" />
</system.web>

关于c# - 如何修复 asp.net 应用程序中的 MAC 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5257312/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com