Intermittent PageRequestManagerParserErrorException

11 posts, 0 answers
  1. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 22 Jun 2007 Link to this post

    I recently posted this as a support ticket, but hopefully someone knows the answer to this problem (or can replicate it):

    Hello Telerik:

    You and I have a problem in common - and I can't seem to fix it on my end so I'll let you know about your problem and hopefully you'll fill me in on how to fix it.

    This problem can be labelled "strange" at best since it is so consistently inconsistent.

    My dev machine's setup is Win Vista, VS 2005 Standard, IE 7.  I experience no problems and never receive the dreaded PageRequestManagerParserErrorException when browsing my site, your site, or any other site that uses ASP.NET Ajax.  So, of course, I thought that all was well with my work.  Apparently not so.

    A customer tipped me off that she was getting the PageRequestManagerParserErrorException whenever she used a page with ASP.NET Ajax interactivity.  The specific example is www.huronperthlakers.ca which uses Ajax when you click on an article title in the "other recent articles" section.  It is important to note that the page will load fine; it's whenever there's a callback that the error fires.

    So I tried this on some other computers around the office, and low and behold, most (but not all) of the machines also were getting the error.  Some machines were IE6, but most are IE7.  I spent a couple of days trying to figure out what I was doing wrong and it just didn't make sense that it would work in some cases and not in others.  So then I figured I'd try other sites and finally, some consistency came into play.

    On precisely every computer that experienced the error with any of my ASP.NET Ajax sites, they also experienced the exact same error on any of the telerik.com QSF examples that used ASP.NET Ajax, not to mention the ajax.asp.net control toolkit demo site.  Conversely, the computers that didn't get the error on my sites didn't get them on yours either.

    The problem for me, and for you, is the distrubingly high number of computers that are experiencing this problem around here.  The other problem is that this is so clearly an issue with ASP.NET Ajax (and NOT r.a.d.Ajax - which works fine on all the "problem" machines around here) and yet Microsoft doesn't seem to acknowledge there's a problem.  Another reason this is an issue for you guys is the fact that you are now building your controls on top of something that doesn't seem to globally work properly.

    The official error is as follows (as it appears in the alert box):

    Sys.WebForms.PageRequestManagerParserErrorExeption: The message received from the server could not be parsed.  Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.  Details:  Error parsing near '<!DOCTYPE html P''.

    Which is interesting because I'm not doing any of the things suggested in the error (nor do I suspect that you are), and it also appears to be failing right off the get-go.  Just to be sure, Ive tested all of the following with my sites:
    • Explicity turned off server trace (which I believe is the default) in the web.config
    • Verified that response.write isn't anywhere in my code (which I already knew)
    • Verified that no response filters are being used
    • Verified that the version number for system.web.extensions is the correct RTM version in the web.config as stated in the documentation for ASP.NET Ajax
    • Verified that, for each of the "problem" machines, that the security settings for the Internet Zone where correct (medium-high for IE7, medium for IE6)
    • Turned off the enableRolesInCookies (suggested somewhere in the ASP.NET forums)

    All of those items were tried both individually and together and none seemed to work.  So I know it's not something with my code since the same error appears on telerik.com and ajax.asp.net.

    I'll send this now in hopes that you can start me down the path to resolution.  In the meantime I will try the following to hopefully help narrow down the issue:

    • Visit other known ASP.NET Ajax sites, such as pageflakes on the "problem" machines
    • Install other browsers on the "problem" machines to see if it's an IE-specific error

    If there's anything else I can try, please let me know.  Thanks,

    Shaun.

  2. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 24 Jun 2007 Link to this post

    ..after a little more research...

    All of the "showcase sites" from the ajax.asp.net site produce the same behaviour *except* pageflakes - but I believe that is because pageflakes doesn't use the "standard" asp.net ajax methodologies.  I've seen a few articles posted by its creator that talk about extremely advanced techniques that go far beyond my current understanding of how to utilize the technology.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Hristo Deshev
    Admin
    Hristo Deshev avatar
    559 posts

    Posted 25 Jun 2007 Link to this post

    Hello Shaun,

    I have a hypothesis! Looking at the error description:

    Sys.WebForms.PageRequestManagerParserErrorExeption: The message received from the server could not be parsed.  Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.  Details:  Error parsing near '<!DOCTYPE html P''.


    I can see that the server has rendered the entire page back to the browser. ASP.NET AJAX will not do that for a web request that has originated from its client components. Now, how does the server know that the current request is a partial rendering request initiated by an UpdatePanel control? The UpdatePanel sets a custom HTTP header that will get read by the server. The header name is "X-MicrosoftAjax" and the  correct value is  "Delta=true."  If that header is not present, the PageRequestManager will render the entire page.

    Can you verify that you are not behind an overly restrictive proxy or firewall that may be tampering or deleting that extra headers? Can you ask your network admins to have a computer's firewall policy be temporarily disabled, so that you can verify if you get the error after you bypass the firewall? Please check if the client computers are running any type of personal firewall software such as ZoneAlarm and such. Try disabling those programs and see if the error disappears.

    Your pageflakes.com report seems consistent with my hypothesis as I think that it does not use UpdatePanel controls.

    Best wishes,
    Hristo Deshev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 25 Jun 2007 Link to this post

    You nailed it!  Our company (and our client's company) uses a Watchguard router, which has an Http setting of "Remove Unknown Headers" - which just might be the default setting for all of the larger Firewalls.  Unselecting this setting made it work as expected; however, the question is, "Should this be an unknown header?".

    I think the answer ought to be "no", but I'm not sure if we need to bang down Microsoft's doors or Watchguard's doors to get it fixed.

    Thanks again.  Hopefully this helps someone save a few days worth of investigating.  I think a blog post would answer thousands of questions about this as a ton of people on the web have never found the answer to this problem.

  6. Hristo Deshev
    Admin
    Hristo Deshev avatar
    559 posts

    Posted 26 Jun 2007 Link to this post

    Hi Shaun,

    Done! Thanks for reporting this.

    Regards,
    Hristo Deshev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. MB
    MB avatar
    149 posts
    Member since:
    Jan 2005

    Posted 27 Jun 2007 Link to this post

    I believe that Watchguard has a config file that you can edit with a plain text editor, and that there is a section where you can add allowed headers.

    If you google on this, you should find a number of "how to" references dealing with the need to modify the .cfg to support ajax etc.
  8. Polaris431
    Polaris431 avatar
    70 posts
    Member since:
    May 2007

    Posted 18 Aug 2007 Link to this post

    I have the same problem. But I am curious to know that if the router is the problem, why then does the problem show up on the websites ajax.asp.net and Telerik's website, as you reported? If this were true, then everyone visiting these sites would see this problem and Telerik would definitely be hearing about it. It seems to me that the router isn't the only factor causing this problem.

    Johann

  9. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 18 Aug 2007 Link to this post

    Hi Johann,

    The router in question is the one immediately in front of the client's computer, ie:

    Web Server -> Router -> Internet -> Router -> Client.

    It has been confirmed that if the router immediately before the cilent's computer strips unknown headers, then all ASP.NET Ajax sites that go through that router will not work.

    Hope that clarifies things.

    Shaun.
  10. jack
    jack avatar
    1 posts
    Member since:
    Dec 2008

    Posted 29 Dec 2008 Link to this post


    Hi , All

    My case is also like that.

    Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near 'Telerik.Web.UI 2008.'.
  11. TonyG
    TonyG avatar
    239 posts
    Member since:
    Feb 2006

    Posted 30 Apr 2009 Link to this post

    For anyone else experiencing this issue as I have just doing localhost development with VS in debugmode, the current link to Hristo's blog is:
    http://blogs.telerik.com/hristodeshev/posts/07-06-24/firewalls_breaking_asp_net_ajax.aspx

    Also the code in this other forum may prove useful to anyone who can't change firewall settings:
    http://forums.asp.net/p/1144748/1930056.aspx

    HTH
  12. Abdul Hafiz Ghazal
    Abdul Hafiz Ghazal avatar
    1 posts
    Member since:
    Jan 2010

    Posted 31 Jan 2010 Link to this post

    I don't use Telerik, but i have the same problem and solved it by placing the Button that contains (Response.Redirect) command outside the UpdatePanel. Hope that might help others.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017