在我们的网络应用程序的一组特定步骤下,我收到了一个相当标准的事件验证错误:
Application_Error intercepted exception: Exception of type 'System.Web.HttpUnhandledException' was thrown.
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentException: 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.
真正令人头疼的是,这发生在我们的测试环境中,而不是我尝试重新创建时的开发环境。我已经仔细阅读了我们的 web.config 中可能发生的变化,但我没有看到任何跳出的东西。环境之间的代码完全相同——TeamCity 确定了这一点。所以我强烈怀疑是环境问题,但我不知道从哪里开始,比如事件验证。这通常在代码中处理。
有没有人知道对此进行调查的途径?我意识到我正在做的一些细节是稀疏的,但那是因为在我们的开发环境中一切都可以 100% 正常工作,而且根本没有问题,所以我不知道什么是相关的,什么是相关的吨。如果需要更多详细信息,请询问,我很乐意提供。