ASP.NET: Unable to validate data

前端 未结 8 1505
野的像风
野的像风 2020-12-08 06:31

What is the cause of this exception in ASP.NET? Obviously it is a viewstate exception, but I can\'t reproduce the error on the page that is throwing the exception (a simple

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 06:43

    "a postback is stopped before all the viewstate loads"

    I've had this exact problem before, and this was the cause.

    Initially we disabled the ViewStateMac property (enableViewStateMac="false" in the page directive) to solve it, but this is not a true solution to the problem and can threaten data integrity. We ultimately resolved it by disabled our submit button until the page had completely loaded, and trimming the size of our viewstate by disabling it on some controls.

提交回复
热议问题