Link to home
Start Free TrialLog in
Avatar of tablaFreak
tablaFreakFlag for United States of America

asked on

ASP.NET: Validation of Viewstate MAC failed

Hello,

I have a vb.net page which I copied as a template and changed all the page name references to itself to the new name. Now I'm getting this error:

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.
And I'm seeing this message below, which means somewhere in the code the page is being redirected back to the original page ( /project_detail.aspx not  /project_template_detail.aspx) I made the copy from, but nowhere in the code that I can find is there a reference to that original page.

[ViewStateException: Invalid viewstate.
      Client IP: ::1
      Port: 55544
      Referer: http://localhost:54249/project_template_detail.aspx?iProjectID%3d1403%26iTaskID%3d0%26sAct%3dProjEd
      Path: /project_detail.aspx
      User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
      ViewState: /wEPDwUJNTE0MTUyNDY0D2QWBAIBD2QWAmYPFgIeCWlubmVyaHRtbAUGZGJUcmF4ZAIDD2QWJAIzD2QWBAIBDxYCHg
I tried setting  EnableEventValidation="false" and viewstateencryptionmode="Never" in the page directive, but didn't help.

Anyone have any idea what I'm missing?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Ammar Gaffar
Ammar Gaffar
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tablaFreak

ASKER

Thank you for your help. I hadn't noticed that I had an explicit action to the old page defined in the <form> tag. Cheers!