Invalid postback or callback argument.

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
9/3/2010 12:36:40 PM
Gravatar
Total Posts 130

Invalid postback or callback argument.

Hi Joe,

I'm running mojoPortal (2.3.51 MSSQL) on multisite mode with Userelatedsites set to 'true', and got an exception while logged into the parent site, setting "Features" for a child site. Upon hitting the "Save" button the exception is thrown:

[ArgumentException: Invalid postback or callback argument.  Event validation is enabled using <pages enableEventValidation="true"/> in configuration o
r <%@ 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) +11179720
   System.Web.UI.WebControls.TextBox.LoadPostData(String postDataKey, NameValueCollection postCollection) +47
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +543
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2637

It's not referencing a particular file. I did some research and found on the msdn library that this exception is called when the EnableEventValidation property was set after the page was initialized. I don't know where to set this property, and also it would probably be overwritten the next time I upgrade anyway so thought I'd include it here and see what advise you have.

Thanks,

Beth

 


							
9/3/2010 12:47:09 PM
Gravatar
Total Posts 18439

Re: Invalid postback or callback argument.

My best guess is you did not use the new Web.config file when upgrading so you are missing

<httpRuntime requestValidationMode="2.0" maxUrlLength="560" maxQueryStringLength="2048" />

you should use the newest Web.config and migrate your customizations to the new file or you may be missing other things.

Hope it helps,

Joe

9/3/2010 1:20:43 PM
Gravatar
Total Posts 130

Re: Invalid postback or callback argument.

Hi Joe,

I checked my web.config and that line of code was there. I fetched the entire source at the time of your last fix so it should have grabbed everything. 

Best,

Beth

9/3/2010 1:37:45 PM
Gravatar
Total Posts 18439

Re: Invalid postback or callback argument.

Hi Beth,

Thanks, I'm able to produce the problem. I will look into it. The issue seems to be that adding features happens inside an updatepanel when you click the arrow button. It really doesn't require clicking the save button at that point, but it seems that something about the state of the page after it has done an ajax postback causes this error when the outer page does post back from the save button.

I'll look into this and try to get a fix into the repository soon. In the mean time you can avoid the error by refreshing the page after adding/removing features.

Best,

Joe

9/3/2010 2:07:26 PM
Gravatar
Total Posts 18439

Re: Invalid postback or callback argument.

Hi Beth,

I guess this was introduced by some work I did to reduce viewstate in site settings page under .NET 4. When I comment it out the problem goes away. I've commented it out and committed it to the repository for now, hopefully I can find a better solution.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.