2013-04-04 49 views
2

我們有一個報表生成器在我們的應用程序,建於一個.NET 2.0IE 10 - 無效的回發或回調參數

每當我們試圖運行在IE 10的報告,我們得到了一個服務器錯誤有以下消息:

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. 
Description: An unhandled exception occurred during the execution of the current web 
request. Please review the stack trace for more information about the error and where it 
originated in the code. 


Exception Details: 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. 

Source Error: 


An unhandled exception was generated during the execution of the current web request. 
Information regarding the origin and location of the exception can be identified using 
the exception stack trace below. 

Stack Trace: 

[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.] 
    System.Web.UI.ClientScriptManager.ValidateEvent(String uniqueId, String argument) +8636377 
    System.Web.UI.WebControls.ListBox.LoadPostData(String postDataKey, NameValueCollection postCollection) +360 
    System.Web.UI.WebControls.ListBox.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13 
    System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +343 
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743 


-------------------------------------------------------------------------------- 
Version Information: Microsoft .NET Framework Version:2.0.50727.5420; ASP.NET  
Version:2.0.50727.5420 

此錯誤僅發生在我們運行在IE瀏覽器上的報告10.

如果我們使用任何其他IE版本或其他任何瀏覽器,我們沒有得到任何錯誤和運行報告精細。

根據Microsoft文檔,這是在.NET 3及以上版本中解決的。但是,我們已經有了.NET 3.5和仍然在IE 10

不工作這是網頁標題:

<%@ Page EnableEventValidation="true" Language="VB" %> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<script runat="server"> 

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) 
    Client_Id.Value = Request.QueryString("Client_Id") 
    Project_Id.Value = Request.QueryString("Project_Id") 
    System_Id.Value = Request.QueryString("System_Id") 
    Report_Page_Heading.Text = Replace(Request.QueryString("H"), "'", "") 


    PartExportFields.SelectParameters.Add("Client_Id", Replace(Client_Id.Value, "'", "")) 
    PartExportFields.SelectParameters.Add("Project_Id", Replace(Project_Id.Value, "'", "")) 
    PartExportFields.SelectParameters.Add("System_Id", Replace(System_Id.Value, "'", "")) 

    SavedCustomReports.SelectParameters.Add("Client_Id", Replace(Client_Id.Value, "'", "")) 
    SavedCustomReports.SelectParameters.Add("Project_Id", Replace(Project_Id.Value, "'", "")) 
    SavedCustomReports.SelectParameters.Add("System_Id", Replace(System_Id.Value, "'", "")) 

    ListBox1.SelectedValue = Request.QueryString("edit") 
End Sub 

Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) 

End Sub 

Protected Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) 

End Sub 

Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter) 

    Page.ClientScript.RegisterForEventValidation("Client_Id", Replace(Client_Id.Value, "'", "")) 
    Page.ClientScript.RegisterForEventValidation("Project_Id", Replace(Project_Id.Value, "'", "")) 
    Page.ClientScript.RegisterForEventValidation("System_Id", Replace(System_Id.Value, "'", "")) 
    MyBase.Render(writer) 
End Sub  
</script> 

任何意見或幫助將是巨大的。

在此先感謝!

回答

0

我發現的唯一解決方案是運行Windows Update。

這下載了所有必要的IE修補程序。

之後錯誤消失了。

0

我遇到了與IE 10類似的問題。IE 10對webforms(具有諷刺意味的是,微軟技術不適用於微軟技術)沒有很好的表現。看到這個link。有一些可以修復一些機器的補丁可以解決一些問題。另外,使用一些微軟Ajax的東西在IE 10中完全不起作用。我能夠修復的唯一方法是發送一個頭部,告訴IE在IE 9模式下運行頁面。

+0

我安裝了修補程序,但仍然收到相同的錯誤 – 2013-04-11 11:06:02

相關問題