Click here to Skip to main content
15,902,853 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
Hello


after hosting a asp.net website when i nevigate from one page to another then following error occured.

C#
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.


what should I do?
Posted
Updated 9-Jun-16 17:44pm
v2
Comments
F-ES Sitecore 29-May-16 11:42am    
Have you googled the error and tried any of the suggestions?
Kornfeld Eliyahu Peter 29-May-16 13:21pm    
Contact the hosting company!
Homero Rivera 29-May-16 20:34pm    
You have functionality that is dependant on ASP.Net Session, like identifying a cookie.

If you have low cost ASP.Net hosting, this will never end... Your application will rotate servers and won't be able to follow up on user identification.

You can rent a whole server for yourself to host your application and you wouldn't be facing this problem.

Other approach is to create identification functionality that is not dependant on ASP.Net Sessions, like storing tokens in database on server and client side through hidden fields. Then to identify users you need to send the tokens to the server and consult the database to take actions on the server side.

try EnableViewStateMac=flase at the Page level

ASP.NET
<%@ Page EnableViewStateMac="false" %>
 
Share this answer
 
Hi there,

The solution is just add this line on your web.config fil,e

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


Above line should be included within section.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900