ASP.NET Ajax Error: Sys.WebForms.PageRequestManagerParserErrorException ASP.NET Ajax Error: Sys.WebForms.PageRequestManagerParserErrorException asp.net asp.net

ASP.NET Ajax Error: Sys.WebForms.PageRequestManagerParserErrorException


There is an excellent blog entry by Eilon Lipton. It contains of lot of tips on how to avoid this error:

Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it

Read the comments too. There is a comment of somebody with the same problem: "I solved it changing server idle time of my app pool on IIS. It was only 5, so I incremented it and now works."

"The UpdatePanel control uses asynchronous postbacks to control which parts of the page get rendered. It does this using a whole bunch of JavaScript on the client and a whole bunch of C# on the server.

Asynchronous postbacks are exactly the same as regular postbacks except for one important thing: the rendering. Asynchronous postbacks go through the same life cycles events as regular pages (this is a question I get asked often).

Only at the render phase do things get different. We capture the rendering of only the UpdatePanels that we care about and send it down to the client using a special format. In addition, we send out some other pieces of information, such as the page title, hidden form values, the form action URL, and lists of scripts."

Most common reasons for that error:

  1. Calls to Response.Write():
  2. Response filters
  3. HttpModules
  4. Server trace is enabled
  5. Calls to Server.Transfer()


Probably there is an error occuring on post back. In this case, you can view the details about the error by adding a PostBackTrigger to your updatepanel and referencing the button which causes the problem:

    <asp:updatepanel ID="updatepanel1" runat="server">        <Triggers>            <asp:PostBackTrigger ControlID="button1" />         </Triggers>        <ContentTemplate>        </ContentTemplate>    </asp:updatepanel>


I had this happen to me and none of the causes on the list in the answer applied. I didn't find the root of the problem until I disabled my AJAX altogether. Discovered that the code was saving an object to the ViewState that contained an unserializable object. I made the object serializable and it started working again.