验证视图状态MAC失败。 [英] Validation of viewstate MAC failed.

查看:81
本文介绍了验证视图状态MAC失败。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,



我在我的域名上传了我的网站它适用于所有功能但是当我尝试注册新会员时它显示以下错误。



应用程序中的服务器错误。



viewstate MAC验证失败。如果此应用程序由Web场或群集托管,请确保< machinekey> configuration指定相同的validationKey和验证算法。 AutoGenerate不能在群集中使用。



描述:执行当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。



异常详细信息:System.Web.HttpException:viewstate MAC验证失败。如果此应用程序由Web场或群集托管,请确保< machinekey> configuration指定相同的validationKey和验证算法。 AutoGenerate不能在群集中使用。



任何人都可以指导解决此错误。



提前谢谢。

Hello friends,

I have uploaded my web site on my domain it works fine for all features but when i try to register new member it shows the following error.

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.

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.

Can anybody guide to solve this error.

Thanks in advance.

推荐答案

我已经解决了这个问题。



需要添加一个机器密钥webconfig

http://www.orcsweb.com/a...es/aspnetmachinekey.aspx



ASP.NET machineKey Generator [ ^ ]
I have solved this.

need to add a machinekey in webconfig
http://www.orcsweb.com/a...es/aspnetmachinekey.aspx

ASP.NET machineKey Generator[^]


在web.config中添加以下代码已修复我的问题。



adding the below code in the web.config had fixed the issue for me.

<pages enableeventvalidation="false" viewstateencryptionmode="Never"></pages>


将此代码放在webconfig中..



Put this code in webconfig..

<machinekey validation="SHA1" validationkey="A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1B2C3D4E5" decryption="Auto" decryptionkey="A1B2C3D4E5F6F6E5D4C3B2A1A1B2C3D4E5F6F6E5D4C3B2A1" />


这篇关于验证视图状态MAC失败。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆