Live Support, Chat, Upload Control and Rich Text Editor
Welcome to Support forums Sign in | Join | Help |Client Center
in Search

PageRequestManagerParserErrorException - Please HELP

Last post 07-09-2009, 10:27 PM by cutechat. 5 replies.
Sort Posts: Previous Next
  •  07-05-2009, 3:24 AM 53732

    PageRequestManagerParserErrorException - Please HELP

    hi,
     
    I'm having some problems with the Ajax Uploader control.  I've placed it in an UpdatePanel which is doing a partial postback, uploading the file, then displaying the uploaded image with buttons to remove etc.

      I'm getting the following error:
     
    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 '<!DOCTYPE html PUBL'.
     
    Reading over the following blog post has given some ideas:
    http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx
     
    On my side, i'm doing any Response.write or Response.Redirect in the updatePanel.
    I'm not using any response filters
    I've disabled server trace
    I'm not using response.transfer
     
    Which leaves one last possible cause to this issue - HttpModules (of which Ajax Uploader is one).  
     
    So, what is it about Ajax Uploader that is stuffing up the output of the UpdatePanel? 
     
    Hoping somebody can help shed some light on this annoying problem (and this ongoingly annoying control)
     
    Cheers,
    Greg 
     
     
     
     
     
     
  •  07-06-2009, 8:59 AM 53757 in reply to 53732

    Re: PageRequestManagerParserErrorException - Please HELP

    Greg,
     
    Can you try to  get what the server returned exactly ?
     
    And I suggest you build the application step by step :
     
    1. build a website
    2. add uploader in to a page
    3. add update panel to that page
    4. apply master page to that page
    5. add the http modules.
     
    you can check which part caused that issue.
     
    Regards,
    Terry
  •  07-07-2009, 4:04 AM 53782 in reply to 53757

    Re: PageRequestManagerParserErrorException - Please HELP

    hi Terry,
     
    I'm not sure how i'd get the data that the server returned - can you suggest how i can do this?
     
    i dont particularly want to rebuild the entire page as it was quite complicated, and worked fine on the prevoius version of the CMS... i'm just after clues as to what might have caused it to stop working now that the CMS is using Master Pages instead of its own templating engine...
     
    cheers
    greg
  •  07-08-2009, 6:17 AM 53826 in reply to 53782

    Re: PageRequestManagerParserErrorException - Please HELP

    Okay, on further investigation, i think i may have found the cause for this problem... turns out the new version of Umbraco is changing the IDs of all html elements, so i'm ending up with stuff like this:
     
    <input id="ctl00_ctl00_ctl00_ContentPlaceHolderDefault_MASTERNoFormContentPlaceHolder_VehicleSubmissionWizard_1_Uploader" name="ctl00$ctl00$ctl00$ContentPlaceHolderDefault$MASTERNoFormContentPlaceHolder$VehicleSubmissionWizard_1$Uploader" type="hidden" /> 
     
    instead of this (which i was getting from the previous version):
    <input id="VehicleSubmissionWizard_1_Uploader" name="VehicleSubmissionWizard_1$Uploader" type="hidden" /> 
     
    Is this likely to cause the uploader control to break?  I'm thinking it'll probably break the event handler setup:
     
    Uploader.FileUploaded += new CuteWebUI.UploaderEventHandler(Uploader_FileUploaded); 
     
    which is probably what the problem is... does this sound right?  I've tested and it seems the FileUploaded event is not firing correctly, or the error is being thrown before the event fires, as i have put some debug code at the top of the event handler, but its never firing.  Unfortunately it's not easy to debug this when its inserted into the umbraco framework, which is why i need to resort to outputting debug data.
     
     How do you suggest i fix it?  Could you perhaps explain or point me to a document that explains how the control actually hooks up with the event handler?
     
    thanks heaps
    greg
     
     
     
     
     
     
  •  07-08-2009, 7:14 AM 53829 in reply to 53826

    Re: PageRequestManagerParserErrorException - Please HELP

    Right-e-O, here's what i've found out:
     
    1. Uploading a file via the Uploader causes a full page refresh, not a postback - is this by design?  
     
    2. Removing the updatepanel fixes the initial problem - kind of
     - files get uploaded and displayed fine
     - because its not a postback, i'm losing all form data in the process
     - because its not a postback, its hard to know which panels to display (its a wizard type form with 3 panels) 
     
     
    SO, i'm guessing the updatePanel solution is erroring out cos its receiving a full page refresh data instead of just postback data... though i dont know how to confirm this.
     
    Please, you guys know this control better than i do... help put me out of my misery, pretty please?
     
    thanks
    greg
     
  •  07-09-2009, 10:27 PM 53881 in reply to 53829

    Re: PageRequestManagerParserErrorException - Please HELP

    Greg ,
     
    1 - when the file be uploaded , it will do the postback , and fire the FileUploaded event.
      if your page use MSAJAX, it will be a AJAX postback , otherwise it will be a FORM postback.
      you can use javascript to catch the PostBack event http://ajaxuploader.com/document/scr/JavaScript-API.htm
     
    2 - Uploader should work fine for UpdatePanel .
     I think your code should be something special , for example ,maybe dynamic creating the control.
     
    You can try to build aother simple page with your control creating logic , and try to reproduce this error.
     
    And then post the code , I will help you to check which part cause that error.
     
    Regards,
    Terry
     
View as RSS news feed in XML
Powered by ASP.Net
Copyright 2003 - 2017 CuteSoft Components Inc.. All rights reserved.