Solved

Invalid postback.

Posted on 2008-10-18
4
575 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
  • 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

OverviewThis article demonstrates a simple search form using AJAX. The purpose of the article is to demonstrate how to use the same code to render a page and javascript (JQuery) and AJAX to make subsequent calls to refine the results. The princip…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now