mrrautio
mrrautio

Reputation: 11

UpdatePanel async postback causes infinite HTTP POST loop and PageRequestManagerParserErrorException

Problem:

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 '<partial text string from __VIEWSTATE variable's value>'.

Update panel HTTP response delimiter data format:

In HTTP POST's response I noticed that pipe ("|") delimited format's (<content length>|<type>|<control ID>|<content text>) HTML content's content length is smaller than HTML content text's actual length. HTML content contains UTF-8 data so character length and byte length is different. However taking this into count doesn't seem to make the lengths match either.

Some information found in the Internet about update panel HTTP response format, but I can't seem to find detailed format specifications nor detailed parser behavior information:

Questions specific to response’s pipe delimiter format:

General question:

Previous questions are based on assumption that the content length mismatch could cause the PageRequestManagerParserErrorException and the infinite HTTP POST loop.

Are there some other possibilities that could cause this infinite loop issue?

Upvotes: 0

Views: 443

Answers (1)

mrrautio
mrrautio

Reputation: 11

Issue got resolved. I'll answer here to some of the questions that were raised.

Are there some other possibilities that could cause this infinite loop issue?

Loop was caused by the parser error in this case. The root cause was that HTTP data routing software was changed in between. The new software modified UpdatePanel HTTP response data before reaching to the end-user's web browser which caused malformation of the data and parser error.

Is format's meaning byte length, character length or something else?

It's character length.

I've tried extensive searching but haven't find specifications about UpdatePanel response's pipe delimited format. Are there any detailed format and parser specifications?

Has the parser behavior been specified in case does not match with ? Can the parser survive it?

Couldn't find specifications, but it seems that the parser doesn't survive if the content length differs.

Upvotes: 1

Related Questions