This is a migrated thread and some comments may be shown as answers.

Sys.WebForms.PageRequestManagerParserErrorException after upgrading to ASP.Net 4.0

5 Answers 117 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 10 Oct 2011, 05:50 PM
I'm getting the following javascript error on a page when clicking an ajaxified button after upgrading to Visual Studio 2010 and ASP.Net 4.0:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Mon, 10 Oct 2011 16:11:46 UTC

Message: 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 '�'.
Line: 6
Char: 84093
Code: 0
URI: http://[website url removed]/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_scriptManager_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ae71d0a15-7471-4384-9905-78bdf2047cba%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.1.413.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3abd09f19b-b595-4ea4-8ab8-449a745bc83c%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3af46195d3%3a19620875%3a874f8ea2%3a490a9d4e%3abd8f85e4%3ae330518b%3a1e771326%3ac8618e41%3aaa288e2d%3a3f6e8f3f%3a8e6f0d33%3a6a6d718d

No code changes have been made to the page and it was working fine under .Net 3.5.  We are on version 2011.1.413.35 of the Telerik controls.

 
EDIT:

I tried serveral different things to get this to work with little success.  As a last attempt I upgraded to the latest version of the Telerik controls, 2011.2.915.40.  When I upgraded I noticed that it was referencing the 3.5 framework version of the dll instead of the 4.0 version.  I manually changed this and retested - it now works again.  Unfortunately, I have to regression test my site due to the Telerik upgrade but we are already in the process of doing this with the 4.0 migration, so it could be worse.

5 Answers, 1 is accepted

Sort by
0
Nikita Gourme
Top achievements
Rank 1
answered on 11 Oct 2011, 09:33 AM
James, I found a thread in the Ajax forum which talks about the same error and provides reasons/solutions for it. View it here:
http://www.telerik.com/community/forums/aspnet-ajax/general-discussions/error-parsing.aspx

Nikita
0
James
Top achievements
Rank 1
answered on 11 Oct 2011, 05:41 PM
Thanks, I have seen that thread but wasn't able to get any useful information from it.

The scenario I have is a button which calls this javascript code to do an async postback:

 

 

var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");

 

 

 

if (ajaxManager)

 

{

ajaxManager.ajaxRequestWithTarget(

 

"<%= [Control Name].UniqueID %>","<%= [Value] %>");

 

}

 

 

return false;

The async call happens and in the page load some session data is manipulated and a Response.Redirect is performed to another page.  It appears that the Response.Redirect is causing the problem.

The debugger catches the error in Telerik.Web.UI.WebResource_2.axd in a section that is commented as MicrosoftAjax.js.  This worked fine under .Net 3.5 and no code changes have been made since the upgrade to 4.0.

 

0
Nikita Gourme
Top achievements
Rank 1
answered on 12 Oct 2011, 09:50 AM
This is certainly eerie, and the most odd part is that the problematic code turned out to be part of the MS ASP.NET Ajax framework (MictosoftAjax.js). Can you validate that you are using the latest and greatest 2011.2.915 paid (non-trial) version of the Telerik Ajax controls? Also it would be helpful if you can test the same app outside of your local network, in case you have a firewall enabled there, and compare the results.

Nikita 
0
Nikita Gourme
Top achievements
Rank 1
answered on 12 Oct 2011, 09:52 AM
A quick follow-up, if I may - also check for any breaking changes in the ASP.NET Ajax 4.0 framework release log, which might be related to your case.

0
James
Top achievements
Rank 1
answered on 12 Oct 2011, 04:45 PM
Thanks Nikita, I was able to resolve the issue yesterday, see the "edit" to my original post.  Upgrading to the latest Telerik controls and using the 4.0 assemblies instead of the 3.5 did the trick.
Tags
Ajax
Asked by
James
Top achievements
Rank 1
Answers by
Nikita Gourme
Top achievements
Rank 1
James
Top achievements
Rank 1
Share this question
or