"An error occurred while verifying the view status Mac ......" Error Solution

Source: Internet
Author: User
An error occurred while verifying the view status Mac. If this application ProgramIt is carried by the Network farm or cluster. Make sure that the same validationkey and verification are specified in the configuration. Algorithm. Autogenerate cannot be used in a group.
If the gridview is used and the datakeynames attribute is specified, it is for security reasons (because the field specified by datakeynames represents the primary key of the data, and the primary key value needs to be saved in the view State and sent to the client, if you tamper with the primary key value, it will cause security issues), the gridview will require the encrypted view status. Therefore, a <input type = "hidden" name = "_ viewstateencrypted" id = "_ viewstateencrypted" value = ""/>.
However, the updatepanel of Atlas must be placed inside <form> </form>, that is, before </form>. This means that the added hidden input control is not placed in updatepanel, but between updatepanel and </form>.
When updatepanel is updated, the Internal Control of updatepanel is submitted to the server for processing (patrial rendering), and the entire page is not submitted. That is to say, the hidden input control is not submitted together. Therefore, the server does not know that the submitted viewstate is encrypted, resulting in MAC verification errors.
Solution:
Add
<Pages enableeventvalidation = "false" viewstateencryptionmode = "never"/>
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.