0

最近我在生产服务器的事件查看器中收到以下错误。它每 5-10 分钟出现一次,来自不同的用户主机地址。我尝试通过单击 default.aspx 页面中的所有链接进行故障排除,但仍然无法重现以下错误。

任何人都可以提出一些建议如何解决以下错误?

Process information: 
Process ID: 18756 
Process name: w3wp.exe 
Account name: NT AUTHORITY\SYSTEM 

Exception information: 
Exception type: ArgumentException 
Exception message: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEventValidation="true" %> in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.
at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



Request information: 
Request URL: http://domain.com/default.aspx 
Request path: /default.aspx 
User host address: 108.162.208.110 
User:  
Is authenticated: False 
Authentication Type:  
Thread account name: NT AUTHORITY\SYSTEM 

Thread information: 
Thread ID: 8 
Thread account name: NT AUTHORITY\SYSTEM 
Is impersonating: False 
Stack trace:    at System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument)
at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
4

1 回答 1

0

您收到的错误是因为您在页面或网站级别打开了 EventValidation。当您尝试模仿用户的事件(最可能使用 javasctipt)时会发生错误。这给 asp.net 一个印象,即事件实际上不是由回发控件触发的。

最可能发生此错误的地方是当您尝试动态创建一些控件时(并且页面也在使用更新面板)。

如果您认为您无法更改应用程序的结构,那么您可以考虑在特定页面上禁用事件验证(但在此之前识别页面)。

于 2014-02-12T12:44:43.803 回答