Hereof, what is a viewstate error?
If the size of a particular page exceeds 135kb, the page will throw a view state error. A screenshot showing a view state error in salesforce. To check the view state of a visual force page you have to make sure that Show View State in Development Mode checkbox in the User Layout is checked.
Furthermore, how do I enable EnableViewStateMac false? All versions of the ASP.NET runtime 1.1 – 4.5. 2 now forbid setting <%@ Page EnableViewStateMac=”false” %> and <pages enableViewStateMac=”false” />. If you have set EnableViewStateMac=”false” anywhere in your application, your application will be affected by this change and you should read on.
Likewise, people ask, how do I fix validation viewstate failed MAC?
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.
How do I stop viewstate error?
In order to reduce the view state, make use of the following:
- "Transient" keyword - to declare instance variables that can't be saved, and shouldn't be transmitted as part of the view state for a VF page.
- Minimize the number of forms i.e <apex:form> on a page.
- Refine your SOQL to retrieve only the data needed.
