Gravatar for

Question by jzheng, Jan 27, 2016 7:23 PM

Unable to apply changes for custom fields: Validation of viewstate MAC failed


When I try to "Apply Changes" to Custom Fields I'll get an error with viewstate MAC failed and no changes were saved. There is no errors logged.

Errors I get:

Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.

Things I've tried:

  1. Added a static machine key as suggested in the microsoft link.
  2. Set LoadUserProfile = true.
  3. Increase the value of the MaxHttpCollectionKeys suggested here:

Does anyone have any idea how I go about resolving this?

Running version: 7.0 x64 Build 8047.0

Thank you.

Gravatar for

Comment by Jean-François L'Heureux, Jan 27, 2016 9:39 PM

What is the name of the field set you try to modify fields for? How many custom fields does it contain?

Gravatar for

Comment by jzheng, Jan 28, 2016 1:00 PM

There is 1070 custom fields. It doesn't matter which field I try to modify they all do the same thing. I can check the options find, like "Facet", "Sort", etc. But when I try to click on "Apply Changes" or de-select the changes it will refresh the page to this error above. The changes were not saved.

Gravatar for

Comment by Jean-François L'Heureux, Jan 28, 2016 1:19 PM

OK, but what is the name of the "Field set"?

Gravatar for

Comment by jzheng, Jan 28, 2016 1:23 PM

Sorry misunderstood your question, the name of the fieldset would be FIELD SET FOR DEV_WEB - CUSTOM FIELDS.

Gravatar for

Comment by Jean-François L'Heureux, Jan 28, 2016 4:28 PM

From the name, I guess it is a Coveo for Sitecore generated field set. Am I right?

Gravatar for

Comment by jzheng, Jan 28, 2016 4:36 PM

Yes, that's correct. Is the index for the Sitecore web database.

1 Reply
Gravatar for

Answer by Jean-François L'Heureux, Jan 28, 2016 5:11 PM


Thank you for your answers to my questions.

With Coveo for Sitecore, you should never modify the Sitecore field options in the CES Administration Tool. If the modification you tried to do would have succeed, you would have noticed later that your modification was overridden.

The way to specify field options with Coveo for Sitecore is to define them in the Sitecore configuration, specifically in the "fieldMap" section of your Sitecore indexes configuration. Coveo for Sitecore is synchronizing the fields and their options at the beginning of each indexing operation triggered by Sitecore. (see Working With Fields)

So if you ever succeed to modify the custom field options of a Coveo for Sitecore field set from the CES Administration Tool, you will lose your modifications the very next time Sitecore will index an item in a Coveo index.

I hope this helps.

Ask a question