2012-01-25 52 views
0

當我運行我的網站時,有時運行時沒有錯誤,有時候會出現此異常。什麼問題?在asp.net項目中運行時出現一個錯誤

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Invalid postback or callback argument. Event validation is enabled using 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.

+0

請看這個回答:http://stackoverflow.com/a/1503660/290343 –

+0

我不明白如何處理這個異常。我需要更多解釋 –

+0

可能有各種原因,請仔細閱讀答案,包括Microsoft有關[EnableEventValdidation]的文檔(http://msdn.microsoft.com/en-us/library/system.web.configuration.pagessection。 enableeventvalidation.aspx)。根據您的安全需求,作爲最後的手段(但只能是最後的手段),請在web.config或每頁基礎上將其設置爲「false」。 –

回答

相關問題