Please help with ViewStateException: Invalid viewstate

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

8/29/2017 4:34:06 PM
Gravatar
Total Posts 3

Please help with ViewStateException: Invalid viewstate

I get this exception first time I am trying to login with the default admin@admin.com account after unpacking the distro files.

 

 

[HttpException (0x80004005): 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: xxxxxxx Port: 51630 Referer: http://xxxxxxxxx/Secure/Login.aspx Path: /Default.aspx User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko ViewState: M9sNqOp7ZOMsEp3ka2o77ccsFcg9y/4LPfsxwLejcXfL5FnUVh5TfL9QswRuYKRApvjKWM0vVLRWm7XQMgBFQIcTcH9p13CGcD/wC47wTv+MyUTp43AFN7RsqxGmBRlS6EkjGc3no81CW299/w+ayG8Mj6ZcQOVTE2i718O1wAdZ6lCGE3wsmmiwWbVOwubjiHho8H/dCRU22JnUgUtrUbJmvxQ4Nf4db/okweC4QN6h5WDieiWNjm481HE7LuZH/K1kuWMermPhF/Tj1rkIiniC/xrcjabwD6p5SCDp49Kgp6G0CwVgvhSCjUIV6dnLJJLK2/FETUTX8j8/SJmK2b+FrQUYSouMdPLkAQ3jqmLKi0yT/liQ8Z9LcpSALwIH6c9AbRjrNRUggg7oKmNB083yg683/nApXoBjSQILlmoTct97Z/WUEITqIS2Q3H+ImaSkg7Mai0oh6ojvmvw7522Wwpwp/yJ8NUIRxFuktkYARemNC5+DpXL97eBAIYN/7Q/FPEVSj53j18+43EgPi7MYS7vc83MFEBqitq1RPkXSJg5LyvJ/18OJBLkgW4IIBjRa5ytwknRk1uqEDCW6LCQF024xX3SmlZB1MSPbonY5qncdIIwJ6ZZIKsmSpX3xbHSG3iQPPnXs2Q05oClpxh4FVIuThdtnF/Vha2Q1kyjhVpix9sN8GcI/mC2pqjujiHGw2lU69r40yfdxwMwDYi1qCLunkGCn5CNc2UFMRjVVzkIn0iHgf/qMBE5ggNWNkdY9L53H/QO9I4hslvDukt/YzudL/idaGJSyVKSd7uNCp...]

 

 

running on a VMware vm no clusters or farms

 

 

steps tried to fix

created a new machine key and added to web config

ran aspnet_regiis -ga "IIS APPPOOL\app-pool-name"

set the app pool LoadProfile to true

 

I would like to get mojoportal to work but so far no luck, please help.

 

Thank you

Gene Rez

 

 

8/30/2017 11:10:38 AM
Gravatar
Total Posts 181
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: Please help with ViewStateException: Invalid viewstate

Hi Gene,

This often happens when there is a long period of delay between the submission of a form and the page load. It could also be caused by lack of memory for the application. What version of Windows is mojoPortal running on?

Thanks,
-Isaac

8/30/2017 2:07:29 PM
Gravatar
Total Posts 3

Re: Please help with ViewStateException: Invalid viewstate

Thank you for a response any help is greatly appreciated.

I consistently and very quickly (31ms)  get the exception any time I click "Sign In" button on /Secure/Login.aspx?returnurl=%2f. I have tried this on two different servers now, both running:

windows 2008R2

IIS7.5 

DotNet 4.6   

SQL 2014 

 

mojosource

mojoportal-2-5-0-0-mssql.zip

8/30/2017 2:39:11 PM
Gravatar
Total Posts 181
Community Expert

mojoPortal Hosting & Design @ i7MEDIA!

Re: Please help with ViewStateException: Invalid viewstate

Gene,

We have several mojoPortal servers running that same configuration and haven't run into this problem. I've added you to our Complimentary Support group, so you now have access to the form on this page: https://www.mojoportal.com/complimentary-support

If you're up for it, use that form to send us the necessary info to log in to your server so we can try to find the issue.

Thanks!

8/31/2017 11:01:02 AM
Gravatar
Total Posts 3

Re: Please help with ViewStateException: Invalid viewstate

Found a workaround for this issue, looks like my problem is not with viewstate but with session, when I try to access the portal website from a different system i.e. not the one I am running the IIS on, I am able to login. I suspect it is not happy with the cookie domain. Thank you for your help. I will upload the logs to the support portal.

 

Gene R..