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

前端 未结 2 1223
粉色の甜心
粉色の甜心 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:

    
    

    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:

    
    

    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.

提交回复
热议问题