Error message: Verify view state MAC failed. If this application is hosted by a network farm or cluster, make sure that the configuration specifies the same validationkey and validation algorithms. You cannot use AutoGenerate in a cluster.
Cause Analysis:
F_app_cux_pro.aspx Page Original code:
This.form1.action = "F_add_app_cux_pro.aspx?" Cuxid= "+$ (" #CuxId "). Val () +" "; This.form1.submit ();
That is, from a page submitted to page B, form submit when the page a __viewstate and __viewstategenerator together post to the B page, the Verification view state MAC failed.
Workaround:
1 //if you set the. NET control to disabled, these controls are not committed2 function setviewdisable (_form) {3 //var _form = $ ("#form1");4 var_viewstate = _form.find ("#__VIEWSTATE");//"__viewstate" and "__eventtarget" and "__viewstatefieldcount5 var_eventtarget = _form.find ("#__EVENTTARGET");6 var_viewstatefieldcount = _form.find ("#__VIEWSTATEFIELDCOUNT");7 var_viewstategenerator = _form.find ("#__VIEWSTATEGENERATOR");8 9_viewstate.attr ("Disabled","Disabled");Ten_eventtarget.attr ("Disabled","Disabled"); One_viewstatefieldcount.attr ("Disabled","Disabled"); A_viewstategenerator.attr ("Disabled","Disabled"); - } - theSetviewdisable ($ ("#form1")); - This. form1.action ="f_add_app_cux_pro.aspx? Cuxid="+$("#CuxId"). Val () +""; - This. Form1.submit ();
RELATED links:
Successful controls,http://www.w3.org/tr/rec-html40/interact/forms.html#h-17.13.2 of the form
When the form is submit, the __viewstate and __viewstategenerator are post to another page, and the Verification view state MAC fails.