locked
Sys.WebForms.PageRequestManagerParserErrorException when published to web server RRS feed

  • Question

  • User-2051535749 posted

    I just published an app to a server that works locally without any issues, when I run it on the actual web server, I'm getting the following error:

    I don't have access to the server or IIS to look at the logs, any ideas on what may be causing this on the server and not on my local when running the web app? 

    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 P'.

    Tuesday, October 9, 2018 4:35 PM

Answers

  • User-2051535749 posted

    Looks like a data issue, even though my local is connected to the same exact database for testing and I can add the same data to the db from my local that I'm trying to add from the server: odd

    UPDATE: I got it working by removing a environment property from the save call

    String or binary data would be truncated. The statement has been terminated. .Net SqlClient Data Provider
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 9, 2018 7:38 PM

All replies

  • User475983607 posted

    Google the error, there's a lot of information out there related to this error.

    https://weblogs.asp.net/leftslipper/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it

    Otherwise, post the markup and code behind file(s) that caused the error.  Lastly, the error is related to AJAX controls.  If you are using 3rd party controls than see support for the 3rd party controls.

    Also this is a bit odd 

    <!DOCTYPE html P'

    it should look like.

    <!DOCTYPE html>



    Tuesday, October 9, 2018 5:15 PM
  • User-2051535749 posted

    None of those things mentioned are taking place in the code. That's the error, I copied and pasted it from the dev tools

    the only difference in the update panel and the other 10 pages using the same code is the stored procedure executing the save, and the code works 100% on my local web server

    Tuesday, October 9, 2018 6:08 PM
  • User475983607 posted

    It is hard to provided assistance without the source code or code that reproduces the issue.  The error message starts at <!DOCTYPE html P'. which indicates there is a problem with the HTML.  The tag should look like this...

    <!DOCTYPE html>

    Use the browser's network (F12) trace to see what's being sent/received.  Also check the browser console for script errors.

    IF you are using telerik controls, see the following.

    https://www.telerik.com/forums/intermittent-pagerequestmanagerparsererrorexception

    or Google in general

    https://www.google.com/search?q=Details%3A+Error+parsing+near+%27+%3C!DOCTYPE+html+P%27.&rlz=1C1GGRV_enUS812US812&oq=Details%3A+Error+parsing+near+%27+%3C!DOCTYPE+html+P%27.&aqs=chrome..69i57j69i58.670j0j7&sourceid=chrome&ie=UTF-8

    Tuesday, October 9, 2018 6:16 PM
  • User-2051535749 posted

    again, it's hard to post code when it runs 100% locally and try to pin point the actual code causing the error. The error is only taking place on the web server that the code was published to, not locally or on any other developers pc's when its ran from VS , only the actual web server.

    The app isn't using any 3rd party tools, just out of the box VS controsl, (gridview, panels, textboxes, dropdownlists, etc.), and F12 is where I got the error message

    Tuesday, October 9, 2018 6:18 PM
  • User475983607 posted

    again, it's hard to post code when it runs 100% locally and try to pin point the actual code causing the error. The error is only taking place on the web server that the code was published to, not locally or on any other developers pc's when its ran from VS , only the actual web server

    And we do not have the code, server, host configuration, or anything related to this issue.  All we have and error message from AJAX controls which indicates an unexpected HTML response; <!DOCTYPE html P'.

    I recommend using the browser's network trace to see what is being returned from the server. 

    There's infinite possibilities for bugs in the code.  For example, an empty catch block that is ignores the actual error.

    Tuesday, October 9, 2018 6:26 PM
  • User-2051535749 posted

    It'd be easier if I can reproduce locally and not ONLY on the actual web server, due to I'm unable to reproduce it locally I'm only able to see what the server is kicking back to me which is:  (when I run F12 in IE and Chrome)

    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 P'. 

    Tuesday, October 9, 2018 6:29 PM
  • User475983607 posted

    It'd be easier if I can reproduce locally and not ONLY on the actual web server, due to I'm unable to reproduce it locally I'm only able to see what the server is kicking back to me which is:  (when I run F12 in IE and Chrome)

    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 P'. 

    When you are in Dev Tools, open the Network tab.  Click in the request that caused the error.  Click on the response tab to see what the server returned.  Often there is an HTML error page the AJAX API cannot handle.  

    Tuesday, October 9, 2018 6:42 PM
  • User-2051535749 posted

    It just kicks me to that error I've been posting. I'm going to remove the panel from the page and run the panel code by itself (no master page) on the server to see if  new helpful error kicks out, to start ruling things out from the server side of things, not local

    Tuesday, October 9, 2018 6:56 PM
  • User-2051535749 posted

    Looks like a data issue, even though my local is connected to the same exact database for testing and I can add the same data to the db from my local that I'm trying to add from the server: odd

    UPDATE: I got it working by removing a environment property from the save call

    String or binary data would be truncated. The statement has been terminated. .Net SqlClient Data Provider
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 9, 2018 7:38 PM