Viewstate验证失败。原因:视图状态提供了完整性检查失败。 2

时间:2013-08-26 19:48:04

标签: asp.net vb.net

我收到了Viewstate验证失败的错误消息。原因:视图状态提供了完整性检查失败。在我回收IIS之前,无法使用我的网站保存数据。我读到这与服务器场中的机器密钥有关。我不确定?这只是一个独立的网络服务器。任何想法如何纠正这个?

Event code: 4009  Event message: Viewstate verification failed. Reason: The viewstate supplied failed integrity check.  Event time: 8/26/2013 3:30:58 PM  Event time (UTC): 8/26/2013 7:30:58 PM  Event ID: 6edb892ff6194dc48ef1182cee318e63  Event sequence: 4  Event occurrence: 1  Event detail code: 50203    Application information: 
    Application domain: /LM/W3SVC/2/ROOT-1-130220190575673097 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\inetpub\wwwroot\website\ 
    Machine name:    Process information: 
    Process ID: 3636 
    Process name: w3wp.exe 
    Account name: Domain\account   Request information: 
    Request URL: 
    Request path: /frmFoodAndBeverage.aspx 
    User host address:
    User: 
    Is authenticated: True 
    Authentication Type: Negotiate 
    Thread account name: Domain\account   ViewStateException information: 
    Exception message: Invalid viewstate. 
    Client IP: 
    Port: 
    User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; Tablet PC 2.0) 
    PersistedState: /wEPDwUKLTYzODM0NTY2Mg9kFgJmD2QWAgIDD2QWAgIDDw8WAh4EVGV4dAUPQmVsbCwgRG9uYWxkIEUuZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFIWN0bDAwJENvbnRlbnRQbGFjZUhvbGRlcjEkY21kTmV4dF5K3yklWc0DODJ8SLoJw+dFVUlgm/CktMaD1teAlLBl

    Referer: 
    Path: /frmFoodAndBeverage.aspx    Custom event details:

1 个答案:

答案 0 :(得分:0)

您可以检查问题是否在机器验证码(MAC)中。设置enableViewStateMac =“false”。如果您不再收到视图状态错误,则问题与MAC功能有关。 您还可以生成一个新的machineKey并将其复制到每台服务器上的应用程序的web.config中。以下是一些可能有帮助的链接...... machineKey的解释 http://msdn2.microsoft.com/en-us/library/w8h3skw9.aspx machineKey发生器 http://www.codeproject.com/aspnet/machineKey.asp