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

Sys.WebForms.PageRequestManagerParserErrorException - DevDiv 89485 Fix

4 Answers 225 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
IQworks
Top achievements
Rank 1
IQworks asked on 16 Mar 2009, 05:12 PM
  I recieved this error using my RadGrid after adding a GridButton with an Image.
  I saw a few different fixes posted by Telerik and I just want to clearify that I understand them so that I can use the best one.
 First, these are not the issue for my problem page:

Calls to Response.Write():
Response filters:
HttpModules:
Calls to Server.Transfer():

  Second, after pouring over many posts within and without telerik, I think I understand that this is not really a telerik issue, but an ajax issue, is this correct ?
  I see that one cause for this is clicking to many times, or , sending to many ajax requests ?
  In essense, when ajax sends the page back, their are other parts of the page that are trying to be rendered along with what ajax is trying to render ?

  
  Here are the questions I have about the proposed fixes I have seen in telerik posts:
1) EnableEventValidation=false. This scares me, through a small amount of research I see that this is ok for pages that do not need a lot of security ? I wonder what "a lot" means. Plus, I intend on using my current grid scheme as a template for many other grid pages some of which have data CRUD.
 2) Anyway, I also found this as a proposed fix, but it looks like I am playing with a part of  EnableEventValidation=false.

<script type="text/javascript">
<!--
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == 'function' && ValidatorOnSubmit() == false) return false;
return true;}
function ValidatorOnSubmit() {if (!document.getElementById('__EVENTVALIDATION')) {
alert('Please wait for the page to load completely'); document.location.href = 'http://something';return false;}
else {return true;}}
// -->
</script>



  3)  Another proposed fix is : <AnyAjaxEnabledControl>.SetMaxRequestQueueSize(5);  I tried to put this in my page load but it
       looks like It is not in my version of telerik ? ("Telerik.Web.UI.dll 2008.3.1125.35 Trial version"). 
      I code it like this :

if

(!IsPostBack)

 

{

RadAjaxManager1.SetMaxRequestQueueSize(0);

 

 

}
      Compiler Error Message: CS1061: 'Telerik.Web.UI.RadAjaxManager' does not contain a definition for 'SetMaxRequestQueueSize' and no extension method 'SetMaxRequestQueueSize' accepting a first argument of type 'Telerik.Web.UI.RadAjaxManager' could be found (are you missing a using directive or an assembly reference?)

  Thanks for your time and your Rad Controls !!
 

4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 19 Mar 2009, 12:54 PM
Hi David,

What are the AjaxSettings for the AjaxManager - does it ajaxify a grid containing the button and thus prevents you from easily resolving this by simply not including the button in the AjaxSettings?
You can also disable AjaxManager (EnableAjax="false") and see if you get a server error.

Additionally if you continue to experience difficulties, please open a support ticket and send me a small runnable application. Thus I will so my best to find a quick resolution of this matter.

For more information about this error please refer to the following article.

Hope this helps.

All the best,
Pavlina
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
IQworks
Top achievements
Rank 1
answered on 20 Mar 2009, 10:54 PM

Hi Pavlina,


I put in a request for an extension on my trial - we are already using Telerik for our application that is in development. We intend to purchase a license soon. I send the files for testing along with it. Hope to hear back from them soon - I did reference this post to them.  

As stated, my problem is I have a GridButtonColumn that is an ImageButton.

in FireFox the first button click is fine, but subsequent clicks get the error. In IE, the problem is intermitant, I can go for days without seeing it (gave me a new respect for FF).
 
The design of my form dosnt allow me to put the button outside the area. The button is on each griditem it is the edit button for each line of data.

 

One potential fix is to use:
foreach (ListItem items2 in this.dropdownlist1.Items)
{
ClientScript.RegisterForEventValidation(this.dropdownlist1.UniqueID, items2.Value);
 }
--OR --
protected override void Render(HtmlTextWriter writer)

        {// For imageButton Ajax Issue

         Page.ClientScript.RegisterForEventValidation(RadGrid1.UniqueID);

         base.Render(writer);

        }

But because I am using a GridButtonColumn, I only have a UniqueName and not UniqueID.

****

Good article on why not to use enableEventValidation="false". Especially in my case where I am manipulating actual CRUD's. 
Understand that I am not asking you to tell me its ok to use enableEventValidation="false". If a property has true/false then its up to the developer, but, I wonder what the percentage of problems are when using it as "false". Can you or anyone out there point me to some good info ?

http://sanzon.wordpress.com/2008/11/15/registerforeventvalidation-and-enableeventvalidation/

*******
enableAjax=false made the page work fine, but you get no ajax.

But from all the posts, this is a widespread problem amongst many many users. But, dosnt look like a telerik issue, more of an ajax issue. Hope they find a solution to this soon.

So, my solutions are:
1) Use something else in the GridBoudnColumn instead of an ImageButton.
2) enableEventValidation="false"
3) Not to use RadAjajxManager, RadAjaxPanel or UpdatePanel.
4) Find a way to use 
ClientScript.RegisterForEventValidation with a GridButtonColumn's UniqueName.
 

As I stated, iI am sending you the app for testing.

Please let me know, thanks
david 
 

 

0
IQworks
Top achievements
Rank 1
answered on 21 Mar 2009, 06:19 PM
Hi,
  For anyone else experiencing similar FireFox problems with this error:

Error: [Exception... "'Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: The state information is invalid for this page and might be corrupted.' when calling method: [nsIDOMEventListener::handleEvent]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "<unknown>"  data: no]

TRY THIS ! :

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

// include in all code where the user might use FireFox.

 

 

 

 

if (Request.Browser.Browser == "Firefox")

 

Response.Cache.SetNoStore();
}

The skinny is that this is apparently  relates to "Firefox 1.5 caching which now caches JS state to improve browser back behavior." 
But, I can tell you that its not just 1.5, i just downloaded 
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
and it still happened until I did the SetNoStore().

You can read about this here: 
 http://forums.asp.net/p/976239/1472501.aspx 

 After a couple of days, these where my new thoughts::

Interestingly enough, because the error is so, so intermitant in IE, but breaks FireFox everytime, I am beginning to wonder if FireFox is the one with the problem ! Why would EnableEventValidation="false"   Make everything

Work in FireFox, but EnableEventValidation="true"  make everything work in IE ?
What “Validation” is so severe in FireFox that IE wouldn’t be aware of ?  Should IE be looking at things it should be catching ? I don’t think so.

 Then I searched for the error in google with a search of:
+"firefox" +"The state information is invalid for this page and might be corrupted."

 So Pavlina, I am canceling my support request for now. I have not seen this error in IE lately, but my research has at least uncovered possible things to look at if I see it again in IE, which I did see only once last week. I still think it is because of that ImageButton in my GridButtonColumn.
I will open a new request if and when I run into this in IE again - which i should sometime - but for now, everything seems to work fine.
thanks for your help
David

0
IQworks
Top achievements
Rank 1
answered on 21 Mar 2009, 06:49 PM
 One last thing, in my excitement at finding a solution, I better ask that if anyone reading this has any issues with the fix that might cause other problems to please, please let me know. I dont want to get all happy about this solution and duck my head in the sand.
 But I am thinking that as long as a fix keeps my ASP.NET/Telerik app validated, my CRUD secure and everything working as expected, im ok with that.
David
Tags
Ajax
Asked by
IQworks
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
IQworks
Top achievements
Rank 1
Share this question
or