This is a migrated thread and some comments may be shown as answers.

Unexpected error suddenly popping up

5 Answers 183 Views
Grid
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 09 Dec 2010, 07:08 PM
I have an application that has been running for over a month now with no problems. Suddenly I am getting the following error when executing an inset or updated on the grids.

Server Error in '/' Application.
--------------------------------------------------------------------------------
  
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) +8627289
   System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +72
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +35
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
  
   
  
  
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

Can someone tell me what is happening here and how to overcome it? It's hopefully a simple fix. I can't figure out it is suddenly acting so bizzare.

5 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 09 Dec 2010, 07:36 PM
Hello David,

Are they entering < or > tags in the textboxes? If so that is the reason for the error. ASP.NET rejects any postbacks that contain those characters to prevent cross site scripting attacks. If you want to allow those values, just set EnableEventValidation="false" on the page you want to bypass the check.

I hope that helps.
0
David
Top achievements
Rank 1
answered on 09 Dec 2010, 08:43 PM
Cori,

That fixed the error message but now my ascx page keeps popping up after update or cancel. The only way I could close it was to click on the [X] on the top right corner. This page is a popup control because it is so large. Any ideas on how to get it stay closed?

0
Iana Tsolova
Telerik team
answered on 14 Dec 2010, 04:03 PM
Hi David,

Does setting the AllowAutomaticUpdates/AllowAutomaticInserts property of the grid to false helps in closing the pop? If not, please share the grid code for further investigation.

Greetings,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
William
Top achievements
Rank 1
answered on 14 Dec 2010, 04:19 PM
They are set to false, but thank you for the idea.
0
Iana Tsolova
Telerik team
answered on 14 Dec 2010, 04:50 PM
Hi William,

In this case would you share a bit more information on your scenario and the problematic grid code?

Greetings,
Iana
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
David
Top achievements
Rank 1
Iana Tsolova
Telerik team
William
Top achievements
Rank 1
Share this question
or