Asp.net Validation of viewstate MAC failed

前端 未结 16 1639
猫巷女王i
猫巷女王i 2020-12-02 20:12

I am receiving the following error at certain times on asp.net website.

 Sys.WebForms.PageRequestManagerServerErrorException: 
 Validation of viewstate MAC f         


        
16条回答
  •  萌比男神i
    2020-12-02 20:56

    my problem was this piece of javascript code

    $('input').each(function(ele, indx){
        this.value = this.value.toUpperCase();
    });
    

    Turns it was messing with viewstate hidden field so I changed it to below code and it worked

    $('input:visible').each(function(ele, indx){
        this.value = this.value.toUpperCase();
    });
    

提交回复
热议问题