Saturday 14 September 2013

Validation Of ViewState MAC Failed Error Asp.Net


If you are receiving Validation Of ViewState MAC Failed Error In Asp.Net web application.

This occurs if you are using controls like Gridview or Detailsview with DataKeyNames on the page and page takes long time in loading.

This issue has been fixed in .Net framework 2.0 SP2 and .Net framework 3.5 SP1. so upgrading to service packs is best option to fix validation of viewstate mac failed error.

Other workarounds can be

1. Set enableEventValidation to false and viewStateEncryptionMode to Never in web.config.
   1:  <pages enableeventvalidation="false" 
   2:         viewstateencryptionmode="Never">

No comments:

Post a Comment