Error: "Validation of viewstate MAC failed.."

Posted By Obaid Sat 17 Nov 2012
Add to Favorites0
Author Message
[email protected]
 Posted Mon 24 Nov 2014
Supreme Being

Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)

Group: Forum Members
Last Active: Sat 29 Nov 2014
Posts: 2, Visits: 9
Hi All,

Can you please help me.....

This error is showing if user delay few second in checkout process (in checkout page), it is showing error and it is going to the error page.....

Please help....

Thnks,
[email protected]
 Posted Fri 10 Oct 2014
Supreme Being

Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)Supreme Being - (1,152 reputation)

Group: Forum Members
Last Active: Sat 29 Nov 2014
Posts: 2, Visits: 9
Hello,

My site is hosted in shared server and I am getting same error.I am using Kartris v2.7001 version.

As per my observation, this error is showing if user delay few second in checkout process (in checkout page), it is showing error and it is going to the error page.

I am getting error from admin same as mentioned.

From my local server it is working fine, no error.

I have changed some config like
------------------------------------------------------------------------
Admin:
<pages validateRequest="false" enableEventValidation="true" viewStateEncryptionMode="Always" />

general:
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Always" enableViewStateMac="false" controlRenderingCompatibilityVersion="3.5" clientIDMode="Predictable">

<machineKey validationKey="D3D116AC6ADF297B69A60D399323C2AF14D3ADB4594B950BBC9BD712EB5F56B1EDCA424D5187F0A7495123FCE45689B311163EEE731694246826B3C0CA95D168" decryptionKey="AD53E582CD1DE6BADF47EEF057DBDF562C4C3A275715279415F096B7E3A59270" validation="SHA1" decryption="AES" />

--------------------------------------------------------------------------

Can you please suggest how I can resolve this issue?

Please help...

Thanks,
Raju
Fri 10 Oct 2014 by [email protected]
Obaid
 Posted Mon 19 Nov 2012
Supreme Being

Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)

Group: Forum Members
Last Active: Sat 20 Jun 2015
Posts: 36, Visits: 118

Thank you for your replies.
I am not using a farm or anything similar; just the one pc.
After spending a lot of time researching this online I changed the permissionto "Everyone" for folder "C:\initpub" and it is nowworking.

But I am not sure it will help others because I did a fewother changes like running "System Mechanic" to clear out 438 registryerrors! And System Mechanic did some other stuff too.

Next time I will use a more scientific approach; change onething at a time and see the results. This way I will be able to guide others bydocumenting the steps.

I will be using this Shopping Cart for our website (www.caraclean.com; sorry to mention it butit always helps with seo). It is 6 years old and written in ASP.Net 1.1.

This would mean getting to know Kartris like the back of myhand before being able to customize it for us.

Can you point me to any links to articles describing thecart from a developer angle?

I will try my best to document the changes I am making andpost them here in days (looks like months really) to come.

Paul
 Posted Sun 18 Nov 2012
große Käse

große Käse - (522,418 reputation)große Käse - (522,418 reputation)große Käse - (522,418 reputation)große Käse - (522,418 reputation)große Käse - (522,418 reputation)große Käse - (522,418 reputation)große Käse - (522,418 reputation)große Käse - (522,418 reputation)große Käse - (522,418 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
I have seen this viewstate mac error, generally two situations:

1. web farm or similar as the error mentions

2. occasionally if you submit a partially formed page

But strange that it happens with localhost, which I assume isn't a web farm.

From the port number quoted, I think you're installing this on the IIS express version rather than full IIS, so the user permissions might be different and the adjustments you made are probably to IIS. CHeck the settings of the web platform installer, I think there is an option to set whether you install on IIS or IIS Express - try to choose IIS if you can.


--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb
Mart
 Posted Sat 17 Nov 2012
Top Banana

Top Banana - (98,239 reputation)Top Banana - (98,239 reputation)Top Banana - (98,239 reputation)Top Banana - (98,239 reputation)Top Banana - (98,239 reputation)Top Banana - (98,239 reputation)Top Banana - (98,239 reputation)Top Banana - (98,239 reputation)Top Banana - (98,239 reputation)

Group: Administrators
Last Active: Wed 18 Nov 2020
Posts: 148, Visits: 3,450
I've never seen that error before, but it mentions a server farm.

Can you give some info about where you are installing this... Is it on a server farm? Or your own machine running locally, or a virtual server, etc?
Obaid
 Posted Sat 17 Nov 2012
Supreme Being

Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)Supreme Being - (21,928 reputation)

Group: Forum Members
Last Active: Sat 20 Jun 2015
Posts: 36, Visits: 118
I have installed Kartris using the platform installer.
I have changed the Application Pool to Framework 4.0.
I have added NetworkService Account with full access.

The error occurs after clicking  "Next" in "Step 3 - Connection String" (browser shows "http://localhost/Kartris/Admin/Install.aspx").
The server name was entered as "localhost\sqlexpress" and that database name is "kartris1".

Here is the error I get:
START======================

Server Error in '/Kartris' Application.

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.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ViewStateException: Invalid viewstate. 	Client IP: ::1	Port: 51738	Referer: http://localhost/Kartris/Admin/Install.aspx	Path: /Kartris/Admin/Install.aspx	User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0	ViewState: TVoXrhxym8RSxqFSDFfT0IPYg3wpySGV2LgD1TadH19FbLWRZbv+TvKKBGwKW2lDnsNANl87cID+suK80e2iiK6zog26K2hYVmiHcyT2L+LtXSFEI+jjGWZVLCkk2JqrT9+FRfYfPC7K0A+yIRHjUq9gZ3MBqX+VzQOSQnkj6dzK3srfIoA9Oeqq93T7N3wek4KDu41YlaZhChhTmzStilYuYJF7uNpWDF/Uus9pQvSqAvv/apgUFWPCXco+M0GNSwWOCQ2T5T0GM8/FrTiqsUkTi1dTgSP5cWqEwV1/C+I2RaftMZHFmTGwuHT4IZ79Vpwfx6lLLqASh/55t3uREdlcBweXe+YKjCgDcXX8JiVO8FEfz7nPRbsLjyIPjYE40kJI+v8Bbk/fTWb+ruyvRnvVIfj/Pm9SHyHhs1hfxM3779PXHFPQkE+x1xmq+GZOtj2Xycf+M2xiGdprHtng9PG+l8GuY1rkZlA4n1DkYbJ03LK8Mf7GE2hbN2y67rQjkS23ZM0jjC8lskRlVKyR32eBtnDP4VK1HMSoGI66arV6HhIFG3jBqSHF+3JrZCPga404ia3dgD3rq5AuN/tmM5i+QbvAjrabZgGE0/OiaXu4yzLGyM/vHVarxPthPYxWHoyXcIIur/siYnsR3pKQNs+6MgfcoHTdroQwyyUX4r0WkAPdzhHQuivsOjQ9EJMKICNlS0J1jjRIoG2Vo6BsnQmwz2vda+tVBG2FxzNUm6kRCp2zBsOzj4Qjk/BiHYDNh7hbIBuJigVDZ+PnRbydfm03YEJdzA...][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.]   System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +12436256   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose) +12327715   System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose) +67   System.Web.UI.HiddenFieldPageStatePersister.Load() +12327927   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +12580515   System.Web.UI.Page.LoadAllState() +51   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +12573463   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +12572973   System.Web.UI.Page.ProcessRequest() +119   System.Web.UI.Page.ProcessRequest(HttpContext context) +99   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +913   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +165
END=================

Does anyone know what is going on here? The solution online require editing web.config but I suspect I do not have to do this and I am doing something wrong! Thanks.

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top