Sys.WebForms.PageRequestManagerParserErrorException

Rate It (2)

Last post 09-23-2009 12:18 PM by mathew7535. 87 replies.

Sort Posts:

  • Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 9:01 AM
    Locked
    • Member
      30 point Member
    • jackh
    • Member since 06-23-2005, 11:31 AM
    • Posts 9

    Hi all,

    I have an aspx page that uses a nested master page. On that page, I added an UpdataPanel to house a few DropDownLists whose selected values depend on the selected values of other DropDownList within the same UpdatePanel. On first partial update of the page in the UpdatePanel when a value is selected from a DropDownList, all the DropDownLists updated correctly without incident. However, on the second select of a DropDownList, I get the following error on a popup message box:

    Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

    I am just curious if this is an issue with the support for nested master pages. I have other pages that has a UpdatePanel setup in a similar fashion described above, but uses a regular master page instead of nested master page. That page's UpdatePanel works perfectly.

    Any advice on this issue is greatly appreciated. Thanks

     

     

     

  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 1:33 PM
    Locked
    • Participant
      1,114 point Participant
    • farmas
    • Member since 08-05-2002, 12:19 PM
    • Redmond, WA
    • Posts 249
    • AspNetTeam

    I am unable to repro this problem, the nested master pages with UpdatePanel is supported. Could you send me some sample pages that can reproduce this problem so that I can take a look at?

    Thanks,
    Federico

  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 1:43 PM
    Locked
    • Contributor
      4,482 point Contributor
    • jodywbcb
    • Member since 03-12-2003, 3:52 PM
    • West Seattle,WA
    • Posts 985
    Verify that you not have tracing (should be trace = false) enabled on the nested master page - or another control in the nested master page that uses response.write...  Might be the source of the problem as its a similiar experience I had...(with trace on)
    -- jody
    My Blogs on .Net 2.0 and Ajax
    http://csk.wbcb.com
    http://ArtbyJody.com
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 1:44 PM
    Locked
    • Member
      5 point Member
    • MoranAmbar
    • Member since 08-31-2006, 7:19 AM
    • Posts 1

    Hello jackh,

    We met the same exception and tried to debug the javascript that handles the parsing of the actual content that returns from the server.
    We noted that there is a bug/problem within the parser logic that parses incorrectly one of the update blocks.
    You can see the bug if you look in the WebResource.axd in the OnFormSubmitCompleted function.

    Note the replyIndex variable - it iterates on the relpy blocks and for some reason on one of the iterations it misses the delimiter by 1, thus failing the parser.
    (It points incorrectly to the location of the actual delimiter '|' instead of the immediate character following it)

    It's the problem we met.

    Please share if you get further findings.

    Good Luck,

    The RUSSIANS!

     

  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 2:05 PM
    Locked
    • Contributor
      5,656 point Contributor
    • Eilon
    • Member since 06-26-2002, 6:14 PM
    • Redmond, WA
    • Posts 966
    • AspNetTeam

    As Federico mentions, nested master pages and UpdatePanels should work fine.

    Some common causes for PageRequestManagerParserErrorException:

    • Trace is enabled on the page
    • Someone called Response.Write
    • An HttpModule has rewritten part of the response
    • A response filter has rewritten part of the response

    If you're seeing this error and none of these are true I'm happy to look at a specific repro case that you have.

    Thanks,

    Eilon

    Blog: http://weblogs.asp.net/LeftSlipper/
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 4:17 PM
    Locked
    • Member
      30 point Member
    • jackh
    • Member since 06-23-2005, 11:31 AM
    • Posts 9

    Thanks a lot for all your inputs.

    I was able to resolve the PageRequestManagerParserErrorException error message issue by including all the involving dropdownlists (asp:DropDownList) in the UpdatePanel, not just the ones that do postback on selectedIndexChanged. That made the PageRequestManagerParserErrorException message box go away. However, i do encounter something else with the PageRequestManagerParserErrorException.

    I found out that if i select something from the dropdownlists and make the dropdownlist update take effect, navigate to somewhere else in the same browser, come back to the same page by clicking the Back button on the browser, select the same set of downdownlists again from the page, I get the same error message of PageRequestManagerParserErrorException. As far as i know none of the conditions applied as mentioned by Eilon. We are using some third party controls from Infragistics. Could that be the source of the problems.

    Thanks again.

  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 4:22 PM
    Locked
    • Contributor
      4,482 point Contributor
    • jodywbcb
    • Member since 03-12-2003, 3:52 PM
    • West Seattle,WA
    • Posts 985
    Odds are using the Infragistics controls may be your culprit as they do use I believe response.write (most compsite controls do)..Try commenting them out if you can or set visibility to false so they are no actually rendered and see if your problem goes away....
    -- jody
    My Blogs on .Net 2.0 and Ajax
    http://csk.wbcb.com
    http://ArtbyJody.com
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 4:33 PM
    Locked
    • Member
      30 point Member
    • jackh
    • Member since 06-23-2005, 11:31 AM
    • Posts 9
    Not being able to use response.write or the controls that use it, i feel, is rather limiting. I hope this is an issue that the asp.net ajax team is currently working on.
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 5:10 PM
    Locked
    • Contributor
      4,482 point Contributor
    • jodywbcb
    • Member since 03-12-2003, 3:52 PM
    • West Seattle,WA
    • Posts 985
    Its is a tad bit more than frustrating. Even the documentation for Ajax refers to ability for composite control authors to extend etc the features of ajax in their own controls. However - there isn't a single composite control that I know of that does not do its own html rendering....In fact - I know in my own project - since I use repeaters and use html rendering to spit out the content from the user controls that may be embedded - means currently I will have to either recode or just skip utilizing ajax in scenarios that it would indeed be useful.  I think its in the pipeline but for now its simply a no go....
    -- jody
    My Blogs on .Net 2.0 and Ajax
    http://csk.wbcb.com
    http://ArtbyJody.com
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-24-2006, 5:16 PM
    Locked
    • Contributor
      5,656 point Contributor
    • Eilon
    • Member since 06-26-2002, 6:14 PM
    • Redmond, WA
    • Posts 966
    • AspNetTeam

    Controls can definitely do their own rendering. You can do writer.Write() all you want and that's 100% supported. In the end that's how all controls render, even composite controls. It's just Response.Write(), which writes directly to the output stream and avoids our partial rendering logic that causes the problem. No control or page should ever do a Response.Write() unless it's doing a fully custom response, such as downloading a file.

    Thanks,

    Eilon

    Blog: http://weblogs.asp.net/LeftSlipper/
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-26-2006, 1:44 PM
    Locked
    • Member
      5 point Member
    • mdas
    • Member since 10-26-2006, 4:27 PM
    • Posts 1

    Hi Elion

    I have a content page for login under a master page. It has few text boxes , required validator controls , validation summary control, OK button and Reset button. The OK button works fine under update panel. But the reset button thorws "Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed." error. There's no code inside reset button click event. However causesvalidation property is set to false in the declaration of the button.  If I make the causesvalidation property to true then  it works fine. But does not meet my requirement for resetting the form. I do not have any response.write in code nor I have set the trace property to true. To give you more information the script manager has been included in master page. The update panel is in the content page. 

     Thanks

     

    Filed under:
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-26-2006, 8:14 PM
    Locked
    • Contributor
      5,656 point Contributor
    • Eilon
    • Member since 06-26-2002, 6:14 PM
    • Redmond, WA
    • Posts 966
    • AspNetTeam

    Hi mdas,

    Can you post a sample of what your page looks like? I tried some similar pages and haven't seen any issues.

    Also, for our next release I've significantly improved the parser error message to help diagnose the possible causes for the error.

    Thanks,

    Eilon

    Blog: http://weblogs.asp.net/LeftSlipper/
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-26-2006, 8:55 PM
    Locked
    • Member
      25 point Member
    • sdaily
    • Member since 10-27-2006, 12:28 AM
    • Posts 8

    Eilon,

    I've spent the better part of the day tracking down the cause of this error message. I have to disagree... writer.Write() cannot be 100% supported. To reproduce:

    • Create a web form and add a ScriptManager and an UpdatePanel.
    • Override the Render() method on the page and add something like: writer.Write("This will throw an error...");

    All of our web forms inherit from a BasePage class, and in this class there are occurrances of writer.Write(), hence the error discovery.

    I am curious... will this be fixed in later versions?

    Thanks,

    Shamus

  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-26-2006, 9:04 PM
    Locked
    • Contributor
      5,656 point Contributor
    • Eilon
    • Member since 06-26-2002, 6:14 PM
    • Redmond, WA
    • Posts 966
    • AspNetTeam

    Let me correct myself. I meant that writer.Write() can be called from any control. And although the Page is indeed a control, it's a very special control. I'd like to learn more about your scenario where you override Render() on a Page. I don't think I've ever seen that done before.

    Thanks,

    Eilon

    Blog: http://weblogs.asp.net/LeftSlipper/
  • Re: Sys.WebForms.PageRequestManagerParserErrorException

    10-26-2006, 9:16 PM
    Locked
    • Contributor
      4,482 point Contributor
    • jodywbcb
    • Member since 03-12-2003, 3:52 PM
    • West Seattle,WA
    • Posts 985

    {edited] because I ride a very special bus... and I bet its shorter than yours...besides just got out of the Betty Ford Clinic for addiction to placeboes..

     

    Original post was code of an example of overriding the Render() ... didn't realize he was speaking of page...nonetheless interested in knowing if this effects controls that are in a ajax enabled page that overrides the Render() event....

     

    sorry...

     

     

    -- jody
    My Blogs on .Net 2.0 and Ajax
    http://csk.wbcb.com
    http://ArtbyJody.com
Page 1 of 6 (88 items) 1 2 3 4 5 Next > ... Last »