Showing posts with label pagerequestmanagerparsererrorexception. Show all posts
Showing posts with label pagerequestmanagerparsererrorexception. Show all posts

Monday, March 26, 2012

PageRequestManagerParserErrorException in Firefox 2

Hi,

My website is using Ajax with UpdatePanel which is working well in IE 7. However, I keep getting the PageRequestManagerParserErrorException when I am testing it in Firefox 2. I am currently using the AJAX Beta 2. I also check to make sure there is no Response.Write while the page is postback. But the error keep poping up in Firefox. Does any know a solution for this?


Many thanks.


hello. can you biuld a simple demo page that reproduces this?

Mine does the same thing. I have Release Canidate. If I refresh the page the error goes away. If you hold your mouse over a button that has a hover event it flashes and you have to click at just the right time. The cursor blinks in the field that has focus as well andt he tab key didn't work. Not sure if I can figure what part to post but I will let you know what I find out.

Good luck

PageRequestManagerParserErrorException caused by Response diddling?

I am porting an old app that downloads a csv file by writing into Response.OutputStream when a button is pushed on the form. The button is contained in an asp:Panel that can be made visible or not, so the Panel needs to be contained in the UpdatePanel.

If the asp:Panel and button are in an update panel, I get PageRequestManagerParserErrorException. If the panel and button are NOT in an UpdatePanel, the download works okay, but of course, I lose the ability to show/hide the asp:Panel.

My question is--is there a way to have a button in an UpdatePanel, but tell it NOT to participate in partial page rendering?

Or is there a better way to do the download??

Thanks,

R.L.

Hi Rlparker,

If you want a button not to participate in partialrendering then you have to make sure that you the button as a postback trigger. This will make sure that the button will act normally as a normal button event. See:

http://ajax.asp.net/docs/mref/T_System_Web_UI_PostBackTrigger.aspx

Hope this helps.

Regards,


Sorry

"you have to make sure that you the button as a postback trigger"

you have to make sure that you define the button as a postback trigger

Regards,


Thanks!!

R.L.

PageRequestManagerParserErrorException

PageRequestManagerParserErrorException - The Message recevied from the server could not be parsed...

I'm using asp.net 2.0 with ajax.

I'm getting that error on page that have updatepanel. the page include master page.

I'm not using Response.Write,Output Caching,Response Filters, HttpMoudle, Server.Transfer

also i add the following attributes

enabeEventValidation="false"Trace="false"ValidateRequest="false" to the page.

the error Occur on some client mechine, after i publish my web site.

it is not occur on my mechine.

what else can I do?

Have you taken a look at this blog?http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx. There is also this blog,http://alpascual.com/blog/al/archive/2007/04/26/How-to-fix-Sys.WebForms.PageRequestManagerParserErrorException-in-AJAX.aspx with this comment by Don Ebert:

"FYI I had the same issue and did everything nothing worked. Then I un-checked REMOVE UNKNOWN HEADERS via the firewall and bang, everything worked. It's possible every1 is looking into it to much. "

-Damien


Thanks a lot. Its Ok now.


Glad you got it working, please mark my last post as the answer if it helped you.

-Damien

PageRequestManagerParserErrorException

I get PageRequestManagerParserErrorException

when a use :

Roles

.GetRolesForUser();

it returns a good string[] but a get a alart from ajax

can I trapp this Exception or can I fix this in som config

Crying

This is a know issue. Look at this post for details:

http://forums.asp.net/thread/1555817.aspx


This is a known issue. Look at this post for details:

http://forums.asp.net/thread/1555817.aspx


yes i also use

EnableEventValidation

="false"

but can i trapp application exceptions in ajax not just clear it on server sideStick out tongue

PageRequestManagerParserErrorException

I really hope someone can help me...

Scenario:

A button inside an UpdatePanel
If when I click the button I execute a Response.Redirect inside the button's event handler I get aPageRequestManagerParserErrorException exception.

This didn't happen with any of the betas (just updated to 1.0).

Any ideas?

Can you post your code. Do you by any chance call Response.Flush?
The code is quite large but I have found that this can be very easily reproduced.
To reproduce the problem you just have to enclose a button that executes Response.Redirect inside an UpdatePanel:

HTML Code:

<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" title="Login" %><%@. Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %><asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <table id="tblLogin"> <tr> <td>Login</td> <td><asp:TextBox ID="txtLogin" runat="server"></asp:TextBox></td> </tr> <tr> <td>Password</td> <td><asp:TextBox ID="txtPassword" TextMode="Password" runat="server"></asp:TextBox></td> </tr> <tr> <td colspan="2"> <asp:UpdatePanel ID="testPanel" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Button ID="btnLogin" runat="server" Text="Login" /> </ContentTemplate> </asp:UpdatePanel> </td> </tr> </table> <asp:Label id="lblErrorMsg" runat="server" ForeColor="Red"></asp:Label> <div id="dInvBrowser" class="errMsg" style="display:none; color:#FF0000; font-weight:bold;">Por favor, solamente utilice Internet Explorer 6.0 (o superior) para acceder al sistema</div> <script language="javascript" type="text/javascript">if(!IE || SM || OP || KQ || (BV<6)) {//document.getElementById("tblLogin").style.display="none";//document.getElementById("dInvBrowser").style.display="block";}</asp:Content>
Code Behind:
Protected Sub btnLogin_Click(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles btnLogin.Click
Response.Redirect("/testpage.aspx")
End Sub
If I remove the "testPanel" then everything works just fine.
Anyone?Help on this issue will be GREATLY appreciated...

Is the page in question protected by a rolemanager/roleprovider? If so see:

http://forums.asp.net/thread/1555817.aspx


No...
Remember this was working perfectly before installing the 1.0 final release of ASP.NET AJAX

Also, you should be able to easily reproduce it: just create an UpdatePanel, insert a button and then simply call Response.Redirect("somee_page.aspx") in the button's click event.


I didn't try your exact code, but I tried this code, and it worked fine... can you spot any differences?

<%@. Page Language="C#" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><script runat="server"> public void button_click(object sender, EventArgs e) { Response.Redirect("http://www.microsoft.com"); }</script><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager ID="sm" runat="server" /> <asp:UpdatePanel ID="up" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:Button ID="button" runat="server" OnClick="button_click" Text="Click Me" /> </ContentTemplate> </asp:UpdatePanel> </form></body></html>

Thank you SO much Steve!

By just looking at your code I realized I had something wrong with my application: I did not correctly upgrade from the last beta to the 1.0
So I re-read the documentation to perform the upgrade and everything is now working perfectly.

Again, thank you VERY much.


This a must read from Eilon Lipton's Technical blog on MicrosoftASP.NET and ASP.NET AJAX when trying to solvePageRequestManagerParserErrorException errors!

http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx?CommentPosted=true#commentmessage A

PageRequestManagerParserErrorException, is it due to web farm?

I implemented an ASP.NET 2.0 web application with the ASP.NET AJAX framework and the AJAX Control Toolkit. When I run it in my development pc, it works perfectly. But when it runs on a production server environment, which is a web farm, the following javascript error message prompts frequently on the browser:
Sys.WebForms.PageRequestManagerParserErrorException: This 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'.
Anybody helps? It's my first project in my current company...

This problem is solved by adding a machinekey to the web.config.

PageRequestManagerParserErrorException with the Update Panel

I have spent quite a bit of time researching this and I cannot figure it out. So if there is anybody that has any ideas I am all ears.

I have a pretty simple site that uses a few update panels. I am developing with VS2005 on XP all the patches and using ASP.NET AJAX 1.0. Everything works perfect on my dev machine and on second beta server I have. When everything get moved to the client site they get the "PageRequestManagerParserErrorException" error on the pages with the update panel. I am not using server.transfer or respnse.write() or any other known issues. The client machine is a test box that was imaged for this app. Running Win2003 all clean and up to date in a pretty standard configuration.

I am just looking for direction: I saw some posts about response caching and machinekey but I have no idea what to look for or what to direct the sys admin to look for.

Any help would be greatly appreciated.

Craig.

Have a look here for troubleshooting tips:http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx

Also see this related post:http://forums.asp.net/p/1038252/1439637.aspx

Hope these help...

-Damien


Damien,

Thanks for the links. In my searching I did come accross them (and meany others). So I threw up a server outside of my network that and tried to hit the pages with an update panel again. And this time I get the error (sometimes). It was strange that I would sometimes get an error and others I wouldn't. So I installed fiddler to see what the response was like. When I get an error I notice this in the respose;

[HttpException (0x80004005): Server cannot modify cookies after HTTP headers have been sent.]
System.Web.HttpCookieCollection.Add(HttpCookie cookie) +103
System.Web.Security.RoleManagerModule.OnLeave(Object source, EventArgs eventArgs) +650
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

I am using a master page that will show differnt information based on the user's role. My guess is that the injection of this error into the response is causing the problem because when it works there is no error. Unfortunatly I don't know what this means yetHmm. Guess it's back to the internet for some studying.

If anybody has any sugestions or direction on addressing this issue I would welcome the advice.

Regards,

Craig


Got it!Big Smile

This link was the answerhttp://forums.asp.net/p/1069056/1556225.aspx#1556225

I still need to read up on the issue but the answer was to set the cacheRolesInCookie=false in the web.config file. Made the change and all is good. Although, I now wonder what the impact is now on perfomance.

Craig

PageRequestManagerParserErrorException with the New ASP.Net Ajax framework

I have two simple web pages with two update panels in them. The first one calls the second one using Server.Tranfer or Server.Execute and it gives the following error message:

Sys.WebForms.PageRequestmanagerParsererrorException: The Message received from the Server could not be Parsed. Common caused for this error are when the response is modified by calls to response.Write(), response filters, HttpModules, or server trace is enabled.

Now, this never happened with the previous framework, atlas. I've tried all possible solutions I could think of, but none worked so far.

Try to take a look at the following forums for?reference.
http://forums.asp.net/thread/1467462.aspx
Wish this can help you.

PageRequestManagerParserErrorException when using a class with asynchronous calls

Hi all,

in the last days i come to a curious problem. On a page i use a GridView to show some data, and on select i show the details in a DetailsView. The Page inherits from a MasterPage and the controls inside an UpdatePanel. The GridView and the DetailsView are populated from different methodes of the same WebService. The WebService is in the same project and a class in App_WebReferences is generated also for testing the WebService function. There are no JavaScriptCalls to the WebService, all is pour C# in codebehind. Now to the problem. When initialice a proxy to the class in the webreference, all works fine and as axpected. But when i generate a class from the wsdl-file with wsdl.exe and use this proxyclass with asynchronous methods inside, the following error pops up:

"Sys.WebForms.PageRequestManagerParserErrorException: The Message received from the Server coul not be parsed. Common couses ..."

The curious is, the first pageload in browser is error free and the firts select also. But when i select a second time a row in the GridView the error pops up, whatever row i select. There is absolute no Response.Write in the hole project and tracing is diabled also.

I use the same struct on several pages in this project and that works. On some pages in this project i use asynchronous calls to WebMethods to populate controls in UpdatePanels without any problems.

Thanks for reading

Problem NOT solved in RC1.


I figured out, the problem comes from my CacheProfile. The WebMethod cache compete with the CacheProfile from the web.config. Simply changed thevaryByParam Attribute and all works like expected.

PageRequestManagerParserErrorException in my AJAX Web Page

Hi All,

I have started to get this intermittent error when I try to open my web site. The starting page uses the Accordion AJAXToolKit Control and a couple of update panels. I noticed that the PageRequestManagerParserErrorException error does not occur every time. Has anyone encountered this error and figured out the solution to this problem?

Thanks in advance

RK

See this article:

http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx


Great thanks. That helped me out. For others benefit I will just post a short blurb of the problem and the resolution. To start with the URL above is very informative.

The problem was that I am using a login control where the user enters the username and password and logs into my website. In my Login Control I had set the DestinationPageUrl to the page I wanted to display after the user was successfully logged in. The problem was occuring when that page was being displayed as it has a few update panels and I guess the client browser was receiving html that it did not know how to render. Thus the ParseRequestManagerParserErrorException.

Resolution: I changed my code to handle the "LoggedIn" event of the Login Control. I do an explicit Response.Redirect to display the page I want to display. This fixed the problem.

I am wondering if the Login Contol does a Server.Transfer instead of response.redirect. I know that the URL above mentions that a Server.Transfer can cause the problem to occur. Anywho I am happy :)

Reddy