How to fix Sys.WebForms.PageRequestManagerParserErrorException in AJAX 1.0

Last year I wrote a fix for AJAX 1.0 on my old blog, looks like many people found it helpful, I wanted to make sure people understood that issue only happened with ASP.NET AJAX 1.0. I cannot reproduce the same problem with AJAX 3.5.

You will encounter this issue when mixing callbacks and postbacks, as callbacks do not use Response.Write and there is not complete Requests to the server.

This is a bug on the MS ASP.NET 2.0 AJAX 1.0, is not that you are doing something wrong, the framework cannot handle the request validation and the exception is thrown. I found that you can catch the exception using the Script manager; information about it here: http://alpascual.com/blog/al/archive/2007/03/26/Code-Snip-_2200_Customizing-ScriptManager_2200_-to-detect-errors.aspx

Or better yet, you can disable the error by disabling the request validation. On top of the webform add: enableEventValidation="false"

UPDATE: setting enableEventValidation does not fix the problem in all the cases. The problem can be cause with a timer in your application as well.

Cheers

Al

Read it here

Published Tuesday, April 22, 2008 11:40 PM by albertpascual
Filed under: , , , , ,

Comments

# re: How to fix Sys.WebForms.PageRequestManagerParserErrorException in AJAX 1.0

Thursday, July 17, 2008 11:16 AM by Don Kang

AJ,

Actually I am getting this error message.

I use godaddy and I have barely uploaded some test pages.

I use VS2008, .Net Framework 3.5 and Ajax 3.5.

I have a radiobuttonlist, and two dropdownlist.

When user selects radiobutton the content of my second dropdownlist changes (suppose to). This scenario works perfectly locally on my computer but when I publish it on the hosting server, I am getting this message.

Any suggestions you may have?

thanks

don kang

kangdon@hotmail.com

Leave a Comment

(required) 
(required) 
(optional)
(required)