Validation of viewstate MAC failed- Server Error in '/' Application

前端 未结 2 1220
粉色の甜心
粉色の甜心 2021-01-21 14:24

I got this error when i access my hosted web application(in VS2008 C# ASP.NET 3.5 Framework)

Validation of viewstate MAC failed. If this application is ho

相关标签:
2条回答
  • 2021-01-21 14:47

    There are a few ways to fix this issue, but some solutions are better than others. The fastest way is usually to add the following to the web.config:

    <pages enableEventValidation="false" viewStateEncryptionMode="Never">
    

    The problem with the above solution is that you sacrifice some security. The next "quick fix" is to add the following to the web.config, but there are drawbacks to this as well:

    <pages enableViewStateMac="false">
    

    If this application is hosted by a web farm or is otherwise distributed across multiple web servers, you should probably steer clear of that option.

    In my opinion, the best overall solution is offered here.

    0 讨论(0)
  • 2021-01-21 14:51

    I believe that your problem is in App Pool "Idle timeout" field. You have to ask to your provider to change it to something greater... say 20mins

    Take a look here.

    0 讨论(0)
提交回复
热议问题