Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > Invalid Viewstate error View modes: 
User avatar
Member
Member
Francis Harvey-hotmail - 8/28/2011 7:41:04 PM
   
Invalid Viewstate error
Hi Guys,

I get error when trying to use search or log to CMSDesk,

I use No-IP port 80 redirection to port 8080 and my router Virtual Server feature

Everything work when I use localhost, if I use my hostname, it crash...
I try to disable my firewall, with no more success.

Should I unblock some other port in the router ???

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.

....

[ViewStateException: Invalid viewstate.
Client IP: AAA.BBB.CCC.DDD
Port: 50159
Referer: http://AAA.BBB.CCC.DDD:8080/
Path: /CMSPages/PortalTemplate.aspx
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
ViewState: /wEPDwUKLTU2MjkyNjQyNw9kFgICARBkZBYCAgMPZBYCZg9kFgJmD2QWBAIDD2QWAmYPDxYCHgdWaXNpYmxlaGRkAgkPZBYCZg9kFgICAg9kFgJmD2QWAmYPZBYEAgEPZBYIAgEPZBYCAgIPZBYCZg9kFgJmD2QWAmYPFQEGPGJyIC8+ZAICD2QWAmYPZBYKZg9kFgJmD2QWAmYPFQIoL015LUJsb2cvTGUtbW9pcy1kZS1sYS1qb2llL0xhLWpvaWUuYXNweAdMYSBqb2llZAIBD2QWAmYPZBYCZg8VAiIvTXktQmxvZy9BdWd1c3QtMjAxMS9MYS1wbHVpZS5hc3B4CExhIHBsdWllZAICD2QWAmYPZBYCZg8VAiUvTXktQmxvZy9KdWx5LTIwMDgvUGFyaXMsLUZyYW5jZS5hc3B4FVNheWluZyBnb29kYnllIEV1cm9wZWQCAw9kFgJmD2QWAmYPFQInL015LUJsb2cvSnVseS0yMDA4L0JlcmxpbiwtR2VybWFueS5hc3B4EldpciBzaW5kIEJlcmxpbmVyc2QCBA9kFgJmD2QWAmYPFQIuL015LUJsb2cvSnVseS0yMDA4L1ByYWd1ZSwtQ3plY2gtUmVwdWJsaWMuYXNweBhEaXNhcHBvaW50bWVudCBpbiBQcmFndWVkAgQPZBYCZg9kFghmD2QWAmYPZBYCZg8VAiAvTXktQmxvZy9MZS1tb2lzLWRlLWxhLWpvaWUuYXNweBJMZSBtb2lzIGRlIGxhIGpvaWVkAgEPZBYCZg9kFgJmDxUCG...]


Please note that i have one computer with Win 7 x64, IIS 7.5 and SQL Server 2008 Express. There is no cluster here....

Thanks a lot,

Francis Harvey

User avatar
Member
Member
francis.harvey-irisco - 8/30/2011 1:56:19 PM
   
RE:Invalid Viewstate error
Hi,

I've applied latest hot fix and it seem to be resolved,

I've changed default host name for my site but I revert every change i've done
to verify that the error is gone...

Thanks

Francis Harvey

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 8/31/2011 5:05:11 PM
   
RE:Invalid Viewstate error
Hi Francis,

Thanks for the update.
Which version exactly have you used before applying the hotfix?

Please let us know if you encounter any further errors.

Regards,
Zdenek C.

User avatar
Member
Member
francis.harvey-irisco - 9/1/2011 11:51:13 AM
   
RE:Invalid Viewstate error
Hi Zdenek,

I did not apply any hotfix before, so it is the installer version that possibly contains the bug,

The hot fixe applied was the latest one, i think it is 5.5R2.37,

I'll verify...

Thanks
Francis Harvey

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/4/2011 2:41:01 AM
   
RE:Invalid Viewstate error
Hi,

In older version there was a bug in full page caching which was causing this error. But, in most cases this error is caused by the things described in the error message (machine key configuration and web farms) or if the application is restarted/killed for some reason and the viewstate is no longer valid.

Best regards,
Juraj Ondrus

User avatar
Member
Member
Francis Harvey-hotmail - 9/4/2011 9:47:36 AM
   
RE:Invalid Viewstate error
Hi Juraj,

It appear the problem is not gone,

It happen sometimes, but not locally on my computer,
It happen only on remote machine,

Is the machine key config should be set even if i don't use any cluster or web farms ??

Thank you
Francis Harvey

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 9/4/2011 10:01:36 AM
   
RE:Invalid Viewstate error
Hi,

I just remembered that this issue was already discussed on our forums in the past in this thread and also one of our customers summarized it on his blog. It is mostly about using the API but also shared hosting and machine key settings are described and explained.

Best regards,
Juraj Ondrus