machineKey validation error

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
User avatar
clevername
Lieutenant (LT)
Lieutenant (LT)
Posts: 54
Joined: Tue Jan 11, 2011 8:54 am

machineKey validation error

Post by clevername » Mon Sep 26, 2011 5:06 pm

I read the wiki topic about the
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.
here:
http://wiki.ablecommerce.com/index.php/ ... ed_problem

I am trying to accomplish the last fix: using a predefined key. I just want to verify that if I get a machineKey from referred site and paste it in the web.config file under <system.web>, I will not get this error anymore? Is this an immediate change or do I have to wait for anything to reset? After that, is there anything else I need to do?

Thank you a lot guys.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: machineKey validation error

Post by jmestep » Tue Sep 27, 2011 7:10 am

That is what you do, but it doesn't guarantee that you won't get that error, depending on what is causing the error. Putting a machine key in the web.config helps to keep the encryption intact and readable if you move the site to a different server.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
clevername
Lieutenant (LT)
Lieutenant (LT)
Posts: 54
Joined: Tue Jan 11, 2011 8:54 am

Re: machineKey validation error

Post by clevername » Tue Sep 27, 2011 9:30 am

The error is coming from our category page. Whenever a user tries to use a control like the sort before the page is fully loaded. The page needs to read this line:

Code: Select all

<input type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" />
and if the user does not give it enough time the error popup shows. Is this the solution you would suggest or do you think delaying the form controls until the page is fully loaded with js? something to the effect of window.onload = form.disabled = false;

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: machineKey validation error

Post by jmestep » Wed Sep 28, 2011 6:47 am

I'm not sure what you would do, but I have seen that error when I haven't waited for a page to load completely. You could try to troubleshoot what is causing your page to be slow or try setting the panel to visible after the page loads, like you suggested.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
clevername
Lieutenant (LT)
Lieutenant (LT)
Posts: 54
Joined: Tue Jan 11, 2011 8:54 am

Re: machineKey validation error

Post by clevername » Wed Sep 28, 2011 9:59 am

Well actually it seems to be when users have IE set to reload fresh content every time they hit the page, intern defeating the purpose of caching and slowing the site down. This is not a huge area of our user base, if any really. But I would still like a reasonable fix. We have an image pop up onHover of the smaller product image (on the category page). But that means it is loading two images per product, on a single page. This obviously is not needed because a user is not going to zoom every product on the category page. I might try to pull the product images, the bigger ones, with some AJAX to speed up that initial load time. Thank you for your help though!

Post Reply