无法在事件查看器中重现错误

时间:2014-02-12 12:13:22

标签: asp.net event-viewer

最近我在生产服务器的事件查看器中收到以下错误。 它每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)

1 个答案:

答案 0 :(得分:0)

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

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

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