Solved

Invalid postback.

Posted on 2008-10-18
4
595 Views
Last Modified: 2013-11-08
if u goto omegalove.com and try to log in with
username:macupryk and password:cupryk you will get
can someone help with this.
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) +8620921
   System.Web.UI.Control.ValidateEvent(String uniqueID, String eventArgument) +72
   System.Web.UI.WebControls.DropDownList.LoadPostData(String postDataKey, NameValueCollection postCollection) +53
   System.Web.UI.WebControls.DropDownList.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +346
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053
0
Comment
Question by:mathieu_cupryk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Expert Comment

by:hakkekushou
ID: 22751191
Without much information to go on you can simply add EnableEventValidation="false" and whatever is causing this will be unable to cause it. However it decreases security in regards to automatic cross site scripting and SQL injection attempts depending on how things are set up. Also you would want to get to the root of the problem and not apply the band-aid I mentioned above. You will want to look at aspects such as are you posting to a page on a different URL Since it seems to be submitting login information I would not suggest the use of a GET based called using querystring paramters (?name=value&name=value).
0
 
LVL 10

Accepted Solution

by:
jinn_hnnl earned 500 total points
ID: 22753563
This normally can come along when you use UpdatePanel, ajax component and dynamic control added to your page.

So when the page is posted back, the controls (dropdownlist, textboxes) within the UpdatePanel, or some specific part, has different built order and render back differently to the client, Ajax function failed as the after. That what could happen

So if you use, Update panel for that table, check carefully the order and client ID, and if the update Panel is unnecessary for this page (it can be very helpful in a lot of case, but some cases, well, we dont need it.

Hope this could give you some direction
0
 

Author Closing Comment

by:mathieu_cupryk
ID: 31507521
If you have a control such as an ascx page where every u include this u must have enableEventValidation="false" . So where ever you are posting to the next page. For instance if i login from the master page and I am going to the profile.aspx page. then u must include this.
0
 
LVL 10

Expert Comment

by:jinn_hnnl
ID: 22753946
Yeah thanks for the remark,

The EventValidation is for checking and preventing JS injection, sometimes its really annoy so we disable them, but we better do it in such way it never raises. Sometimes you can see the source after and before postback the clientID of controls are different. This is because the auto generate mechanism of dot net on dynamic control, espcially in case of UpdatePanel. This will cause quite a lot of problem.

Glad you work it out, ^^

I think hakkekushou deserve some credit too. ^^
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This article discusses how to implement server side field validation and display customized error messages to the client.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question