Solved

Invalid postback.

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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