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

If you've used the Microsoft ASP.NET AJAX UpdatePanel control, there's a good chance you've hit the "Sys.WebForms.PageRequestManagerParserErrorException" error.

What's a PageRequestManagerParserErrorException?

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.

As I mentioned, this is rendered out using a special format that the JavaScript on the client can understand. If you mess with the format by rendering things outside of the render phase of the page, the format will be messed up. Perhaps the most common way to do this is to call Response.Write() during Page's Load event, which is something that page developers often do for debugging purposes.

The client ends up receiving a blob of data that it can't parse, so it gives up and shows you a PageRequestManagerParserErrorException. Here's an example of what the message contains:

Microsoft Internet Explorer
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 'Hello, World!106|upd'.

If you ask me, this error message is not all that bad. After all, I'm the one that made it :) The details indicate what was being parsed when it decided to give up. You can see the part of the text from my Response.Write(), and immediately after that is part of the special format I keep mentioning.

Why do I keeping getting a PageRequestManagerParserErrorException?

Well, chances are you're doing one of the things mentioned in the error message. Here are the most common reasons and why they don't work:

  1. Calls to Response.Write():
    By calling Response.Write() directly you are bypassing the normal rendering mechanism of ASP.NET controls. The bits you write are going straight out to the client without further processing (well, mostly...). This means that UpdatePanel can't encode the data in its special format.
  2. Response filters:
    Similar to Response.Write(), response filters can change the rendering in such a way that the UpdatePanel won't know.
  3. HttpModules:
    Again, the same deal as Response.Write() and response filters.
  4. Server trace is enabled:
    If I were going to implement trace again, I'd do it differently. Trace is effectively written out using Response.Write(), and as such messes up the special format that we use for UpdatePanel.
  5. Calls to Server.Transfer():
    Unfortunately, there's no way to detect that Server.Transfer() was called. This means that UpdatePanel can't do anything intelligent when someone calls Server.Transfer(). The response sent back to the client is the HTML markup from the page to which you transferred. Since its HTML and not the special format, it can't be parsed, and you get the error.

How do I avoid getting a PageRequestManagerParserErrorException?

To start with, don't do anything from the preceding list! Here's a matching list of how to avoid a given error (when possible):

  1. Calls to Response.Write():
    Place an <asp:Label> or similar control on your page and set its Text property. The added benefit is that your pages will be valid HTML. When using Response.Write() you typically end up with pages that contain invalid markup.
  2. Response filters:
    The fix might just be to not use the filter. They're not used very often anyway. If possible, filter things at the control level and not at the response level.
  3. HttpModules:
    Same as response filters.
  4. Server trace is enabled:
    Use some other form of tracing, such as writing to a log file, the Windows event log, or a custom mechanism.
  5. Calls to Server.Transfer():
    I'm not really sure why people use Server.Transfer() at all. Perhaps it's a legacy thing from Classic ASP. I'd suggest using Response.Redirect() with query string parameters or cross-page posting.

Another way to avoid the parse error is to do a regular postback instead of an asynchronous postback. For example, if you have a button that absolutely must do a Server.Transfer(), make it do regular postbacks. There are a number of ways of doing this:

  1. The easiest is to simply place the button outside of any UpdatePanels. Unfortunately the layout of your page might not allow for this.
  2. Add a PostBackTrigger to your UpdatePanel that points at the button. This works great if the button is declared statically through markup on the page.
  3. Call ScriptManager.RegisterPostBackControl() and pass in the button in question. This is the best solution for controls that are added dynamically, such as those inside a repeating template.


I hope I've answered a lot of questions here and not angered too many of you. We're looking at ways to improve some of these situations in the next version of ASP.NET, but of course there are no guarantees. If you avoid changing the response stream, you're good to go. If you absolutely must change the response stream, simply don't do asynchronous postbacks.



  • Can u get me..information on known AJAX RC1 bug.


    For IE7, click on any asp:imagebutton on extreme top or left corners that initates postback.

    You will get System.Format exception becuase IE7 passes ImageClickEventArgs e values wrong

    and e.Y=-1

    so e.x creates parsing exception.

    Note:It works perfectly in firefox.It occurs in IE7 and IE6.


  • You forgot the bug in the role provider. It's on the forums, some people have to disable caching roles in cookies to avoid the error. It seems that the role provider adds the cookie to the response when it's too late.

  • I'm getting that error right now. I have an update panel with a wizard control inside. On a step I have a button that changes the text of a textbox. Before I click the button I can navigate to any step just fine, but I get that error on the first step navigation click after I click the button that adds the text. It doesn't happen every time though. Very strange. The message says the error occurs at:


  • Atit,
    To submit bug reports, please use Microsoft Connect.
    Yup, that&#39;s another case where it doesn&#39;t work. I believe that bug will be fixed in the next release of ASP.NET AJAX.
    I&#39;m not sure what&#39;s happening there. Do you have anything using output caching? It looks like some component on the page is rendering out some additional markup that shouldn&#39;t be there.
    - Eilon

  • Eilon,

    Rendered HTML markup is same as for firefox.
    Again, I am not using any output caching.

    You can simply reproduce by creating new AJAX website with just simple page.

    Take imagebutton that initates postback in asp:updatepanel.

    Click on extreme top or left corners.You can easily get exception in ie7.


  • Atit,
    I'm sure the bug repros, but you'll need to file the issue on the Microsoft Connect web site that I linked to. This is just my little old blog, not a bug reporting site :)

    - Eilon

  • This error can easily appear when the session has timed out while the user's page was idle.

    Can you post a link to a site describing how best to handle this error when it occurs? While the error message might be beautiful to a developer, it's not at all to an end-user...


  • At my company we have just begun experiencing a problem when using UpdatePanels with Response Filters after upgrading to the release version of atlas. We have multiple clients running within the same environment and we give them the ability at runtime to customize certain business terms like "Supplier" to match their internal usage. Rather than ever directly use the term Supplier, we use a token [$Supplier$], then each client can customize that token to match what they use internally: Supplier, Vendor, Distributor, Partner, etc. These tokens are used throughout the application: in aspx pages, in c# code, inside text stored in the database. Replacement terms are stored in the database and are modifiable through the web interface at runtime by the clients themselves. The solution we came up with to allow dynamic on the fly replacement of tokens regardless of where they came from was a Response filter. Essentially we just run a regex on the response, swapping out tokens for the replacements configured by the client that the current user is associated with. ASP.NET localization doesn't help us because the clients want the ability to change the tokens at runtime via the frontend.

    In the previous version of atlas that we were using the response filter caused us no problem. After upgrading to the release version of atlas however, we must either disable partial rendering in the script manager tag (basically stop using update panels) or disable the token replacement filter (not an option).

    Do you have any recommendations or workarounds? Will this limitation where update panels do not work with Response filters be addressed in a future version of atlas?


  • Eilon,

    I have the same problem that Dominick has.

    No Response.Write
    No Output Caching
    No Response Filters
    No Trace
    No Http Module
    No Server.Transfer

    Just an ImageButton in a GridView and Nested Master Pages.

    The ImageButton click only hide the GridView an show a Wizard.

    The error doesn't happen every time.


  • I have a page that has worked fine up until today, and I haven't changed any code or html in the page since it last worked without error.

    Situation is this...2 update panels; top panel contains 2 DropDownLists, 3 LinkButtons and 3 ImageButtons. It's a drill-down scenario where user selects option from DDL 1, then DDL2 is made visible and loaded with options. At that point, the 3 LinkButtons are made visible for selecting. Once a LinkButton is selected, the requested data is loaded and displayed in a GridView residing in UpdatePanel #2. The 3 ImageButtons are then made visible to allow for printing or downloading the data or viewing help.

    This scenario has worked fine for me for the last week, flawless even. Then today, out of nowhere, it began throwing the ParserErrorException. It does this everytime I load the page for the first time in a session. I can select from the first DropDownList, then the second is displayed and loaded with options. As soon as I select select an option to trigger postback and retrieval of data, the error is thrown.

    If I then view another page, then return to the affected page, it works without problem under all scenarios. This is very strange to me and I'm having a hard time isolating the cause. The controls I mentioned are the only ones on the page, other than some text and a few labels and divs.

    Does this make any sense and can you think of anything I might look into for the source of the problem? Nowhere am I using any of the "known" problematic scenarios such as Response.Write(), etc...

    Many thanks...

  • Shaggy,
    The parser error will indicate where the failure occured in the response text. Does it give any hint as to where the problem is? Usually you'll see some text there and be able to figure out who generated that text and using what mechanism. In the example error I showed in the original post, I'd look throughout my source code to find where I'm rendering "Hello, World!". If I do that and see that it's the Response.Write(), I know that's the problem.

    - Eilon

  • Shaggy,
    The pipe "|" is part of the UpdatePanel response format, so it wouldn't appear in your code. However, something is definitely odd here. It looks like is rendering out the before the even begins, which is very odd. On the other hand, nothing should be rendering out the or tags since they shouldn't inside an UpdatePanel either. I'd suggest starting with a new, blank page that works fine, and then gradually add parts to it until you find out which one does not work.

    - Eilon

  • Well, the problem miraculously went away once published. After publishing it, I immediately viewed the page and it did not throw any errors for me and has worked fine since. I guess it's possible that someone beat me to the initial page view, but if so, no big deal as it seems to be working well now. I still get the problem locally though. I guess I will try to rebuild it when I have time to see if I can figure out where it goes wacky.

    Feel free to see the results at

    Thanks for all the insight...

    - Shaggy

  • You can use Server.Transfer if you pass 'false' in the second parameter.

  • Hi all,

    I am seeing this problem only when I publish my website, and oddly enough when using an ImageButton outside of the UpdatePanel (registered as a trigger) too. The UpdatePanel contains a single WebUserControl, which is dynamically loaded in code-behind. Is this perhaps a bad idea? It works fine locally.. and there's no Respone.Writes et cetera. Comments anyone?

  • Hi Eilon,

    Thanks for making this post - it is definately helping! Can I ask you this though: If my updatepanels work perfectly on my local machine (both from within VS2005 AND the published version via IIS) but DON'T work up on the server, what else should I be looking for? Some pages work, but others don't, or don't render properly. I am even getting the odd timeout. Any ideas? I sold this project to my client because the AJAX stuff is so cool!

  • Great info here, thanks, but I am not doing any of the common causes like Response.Write...
    I only get the error on the first page load and it's always:

    Details: Error parsing near '


    I am using a MasterPage with an UpdatePanel around a GridView. Is there another solution to prevent this that was not mentioned here?

  • Hi Eilon,

    I have a page that contains a viewform in side an update panel. The Viewform allows the users to edit the information with in the view form. The Edit Version of the form contains texts box’s labels and drop down lists. what happens is when I start VS2005 and open my project and run my app (Debug mode), the first time that I click the Edit button I see the "Sys.WebForms.PageRequestManagerParserErrorException ", If I click the OK button and click the Edit button again I don't see the error. if I stop the debug session and start another debug session, and click the Edit button I don't see the error. I see this error only the first time after I have started the VS2005. Can you tell me what I am doing wrong?

  • Hi Eilon,

    Is there perhaps a way to 'encode' the ascx web user control HTML to prevent these parser errors?

    Cheers, Mark

  • I've solved my PageRequestManagerParserErrorException errors (finally!)

    Try enableEventValidation="false" on the ASPX page containing the UpdatePanel.

    Note that my page had the ImageButtons initiating the UpdatePanel refresh outside the UpdatePanel, and that I declared an AsyncPostBackTrigger in the UpdatePanel for each ImageButton Click event.

    I will include this advice on some of the other posts, as there are quite a few people having this problem I think.

  • Thanks its working fine.

  • I have a similar situation to the one mentioned by Greg B. The error only occurs on clicking a button on the first page load. After dismissing the error message the error doesn't occur again. (Occasionally the error doesn't occur the first time). The error details are similar (though not identical) to what he reports:

    Details: Error parsing near '>


    I too am not doing any of the common causes listed above.

    The error doesn't occur when I set enableEventValidation="false", but this isn't recommended for security reasons.

    I would much appreciate any feedback.

  • I get a weird "next-step-problem" with the UpdatePanel: On page "A", inside an update panel i have a GridView. In the GridView's RowCommand code
    i have a Response.Redirect to page "B". This all works fine except; on page "B", in PageLoad i want to save a copy of Request.UrlReferrer, but it is now NULL. This only happens when the GridView is inside an update panel.
    Any clues anyone?

    Regards, Ola

  • Eilon, great information. I thought I had solved this issue another way, in the case where there are multiple user controls on a rendered page, each with an update panel on it. For instance, a navigation bar on the left, and a detail section with another update panel. The error message I get is pointing to near the first UpdatePanel when a AsyncPostback happens in the second. I thought it may be that I was lazy and left them as the default name and then were reffering to the wrong instance, but it happens when they are uniquely named. For now, I'm removing the UpdatePanel in the first UserControl, but it would be nice to have them wherever I felt like it. :)

    Any idea would help.

  • Hey guys,

    A major possible reason is trying to set an initial session using the AJAX updatepanel. This will result in one error, then no errors for ages unless you load another browser/clear cookies, etc.

    Just call Session["blah"] = true; in your page load event.

    This will create the cookie needed for the session variable to work, and therefore anything using a session will also work without throwing the error.

  • If you have to change the Response stream, here is a way to do it properly:

    Basically one deconstructs and reconstructs the ajaxy format.

  • Just upgraded an application from RC1 to RTM 1.0 and started experiencing this problem.
    If it helps anybody, in my case it turned out to be http compression was turned on and it caused the update panel to raises the error. Turned it off and voila, fixed.

    PD: http compression is implemented in our home-cooked web framework by appending content-encoding header gzip/deflate values.

  • FYI, Server.Transfer doesn't cause to HTTP requests whereas Response.Redirect does. If you do a fiddler on it you will see it. The only reason to do a Server.Transfer is for transfering to a different page on the same domain.

    The benefit is that it only does one HTTP request. Not that I use it... but I thought I would let you know.

  • I have a page with radio buttons inside an update panel, when one of them are selected and event is fired that hides certain panels based on which selection is made. It works fine for everyone except when people go through the proxy server they get the error Sys.WebForms.PageRequestManagerParserErrorException and the details say "<!DOCTYPE html P'." Now on the page the P is the middle of the word public.

    The page is using Master Pages
    No Response.Write
    No Server.Transfer
    No Server Traces
    No HTTP Modules
    NO Response Filters

    Any ideas?

  • This tip rocks. You saved me a bunch of work.

  • The enableEventValidation="false" tip fixed the error for us. Luckily the page I put it on doesn't require any heavy security but I would like to see a fix for this bug as well as the session timeout bug, and last but not least on my Ajax wishlist the ability to completely suppress errors that get "alert'ed" to the user's screen.

  • 我还是没有看明白,由于session 过期这个问题时的处理方法。

  • I have found out how to fix my issue with this showing up....

    I have a theme with a css which was automaically being imported but I also had it on my master page. It was showing up twice in the of the source on the pages. Once removed from the master page the error has went away.

  • Let's say you cut an past some text from somewhere and it contains Unicode chars and you want to display it in a label. You will get the same error. Since HTML is UTF8, it should be an easy fix to override the page Render method and replace all Unicode chars with their &#[code]; HTML representation.

  • I really like the convenience of the in-page Trace output from the DefaultTraceListener, but yeah, the complete crash if it's used on a page with AJAX is a problem. How difficult would it be to derive a class from DefaultTraceListener and somehow have it redirect it's output to a new browser window?

  • I have an ajax-enabled webpage with a single updatepanel. The site works great on my local development box, but when copied to the web server (that has ajax installed; using 'Publish Web Site' in VS 2005), I receive the following during a postback on that page:

    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 ' <!DOCTYPE HTML P'.

    I do not have any response.write()'s or anything else mentioned above that I can see. I am using response.redirect("page.aspx") in buttons outside of the update panel, but I haven't read anything about that being an issue yet. The update panel contains a textbox, listbox, and button (all aspx controls). Any ideas?


  • hi Eilon,

    First of all thanks for the information you are posting... i'm having a problem related to this (i'm a newbie)... well i'm facing this error when trying to add a usercontrol to another usercontrol in runtime. Both are created programatically. I don't have put any of the possible causes to face this... Thanks in advance

  • hi Eilon,

    First of all thanks for the information you are posting... i'm having a problem related to this (i'm a newbie)... well i'm facing this error when trying to add a usercontrol to another usercontrol in runtime. Both are created programatically. I don't have put any of the possible causes to face this... Thanks in advance

  • I am getting the error as well and like others I am not doing anything fancy with the responce stream.

    here is the text of the 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 'br />



    Some of the other tricks do not seem to have worked thus far. Error is inconsistant and will crop up on any page whether or not it has been viewed previously in the session.

  • Great article man! Solved the problem. Thanks.

  • I put the attribute EnableEventValidation="false" and now works
    I have an AsyncPostBackTrigger
    fine thanks a lot Mark

  • Here is a solution that I found:

    Check your firewall settings to see if it is set to remove unknown headers. If it is, change that setting so that it does not. This fixed the problem for me.

  • I want to download a jpg image to the client on the update panel. If I cant use response.write(), then is there any other way to accomplish this

  • hi,

    when we use the application in outside of network this error will comming, whenever we send a request to server that time this error will occuring.

    " 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 "

    above post 2 persons are get solved
    1. EnableEventValidation = "False", but this isn't recommended for security reasons.
    2. Changes in Firewall Setting.

    Let me know, in Firewall what are changes we want to do for fix this problem.

    pls, give the result asap....

  • Referring to this message: Has the new release of AJAX come out that fixes the bug in the role provider?

    # re: Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it
    Tuesday, February 27, 2007 1:41 PM by Eilon

    To submit bug reports, please use Microsoft Connect.


    Yup, that's another case where it doesn't work. I believe that bug will be fixed in the next release of ASP.NET AJAX.


    I'm not sure what's happening there. Do you have anything using output caching? It looks like some component on the page is rendering out some additional markup that shouldn't be there.

    - Eilon

  • Hi Eilon,

    I had a similar problem to some of the above, I'd done everything recommended in your blog but was still getting the error.

    I had a look at the update panel response stream using :-


    I noticed there was some error text at the end (Unable to serialize the session state etc..), which was related to me trying to insert a connection object into the session when the session state mode was 'SQLServer' (silly me).

    I'm assuming AJAX saw this as something trying modify the response stream and threw the 'Sys.WebForms.PageRequestManagerParserErrorException'.

    Hope this helps someone!

  • Hi guys,

    I'm working on a AJAX enabled Website and tested it in various browsers.
    A page using AJAX works fine in IE (what a surprise) in Firefox and Opera.

    It rises this error in Netscape, Mozilla, Seamonkey, mostly after 2-4 clicks.
    All browsers with latest version available. Unfortunately I can't check mac browsers.

    Why does AJAX work in some browsers and in the others it doesn't??

  • i do not found any solution. i try out all givan solution. actually i want to export datagrid Data to excel.if u have any solution please post it.

  • Thanks to Simon!
    I have a button & dropdownlist in an updatePanel that is setting a session variable upon postback. This was the first time I've seen this error.

    Adding Session("variable") = True fixed my problem.
    You Rock!

  • Vipul,

    I had the same problem with a download to excel button. I resolved it by putting the button in the update panel and setting a trigger to force a full post back on the button.

  • Jim, thanks. That solution works fantastically. Wish I had found the answer hours ago.

  • This problem is unsolovable.. Tell me proper steps to solve this problem.

    Reply soon

  • I am getting this error when the session times-out. Unfortunately, I am not allowed to set EnableEventValidation to False, so I am wondering if there is a way to catch this error before the popup window shows, and that way I can send the user back to the login page?

  • Dear Eilon,

    I receive this error when my server sends a response back to the update panel.

    Why does my server send this message? How can I prevent it? If I can't prevent it, how can I suppress the error message?

    The update panels are updating on panels every second, so I don't care if they fail silently every now and then.

    Many thanks, ben

  • I went through with all the solutions what is been provided in the above whole chat but nothing worked fine for me. Finally i got one solution which is working fine and also works fine for all the problems mentioned above. My problem was downloading a file from DB and wrting into the response stream to allow the client to save that file in his/her local system. for which i was getting Sys.WebForms.PageRequestManagerParserErrorException exception. This will happen when we use the AsyncPostBackTrigger trigger in the update panel (like ). whenever i used to click on download button i was getting that error. so along with the AsyncPostBackTrigger what i used for autorefresh i used the following code . after giving the above code whenevr i am clicking on download button it is downloading properly without any problem. the trigger elemnet of update panel finally looks like this:

    For whichever event we want to modify the response stream for that event we have to mention in the PostBackTrigger and it will just works fine. Only thing in this is that the whole page gets postback only for that event for the rest of the things it will just works fine.

  • I have found another cause for this error, when i initialize a session variable during the curse of the postback caused by an update panel i receive this error.
    I fixed it by initializing the session variable in the page_load event.

    i hope this helps.


  • This may or may not be helpful to someone, but I recently resolved this error by setting in my webconfig. Hope it helps someone ...

  • I bypassed this bug deleting the OutputCache directive from my aspx pages

  • Just thougt I would throw in something I found that may help. My problem was the same as Greg B and Fred. I could recreate it by stopping the "ASP .NET Development Server". I would get the error EVERY time the page was loaded the first time. Subsiquent page loads, even in another debug session, worked as long as the Development Server was not stopped. After evaluating the ENTIRE page, not just within the Update Panel, I found where I mis-spelled a css class.(class="dumbspellingerror") This was outside the Update Panel. Once this was corrected, I no longer got the parser error. FYI, I did try enableEventValidation="false" and that also made the error go away. I removed that property once i corrected my spelling error.

    Hope this helps someone.

  • Eilon,

    I can confirm the bug together with the RoleManagement caching set to true. Switching it off solved my problem. The ErrorMessage linked to the following Code Snippet:




  • I have a TabContainer with some of the tabs created dynamically, all inside an UpdatePanel. Sometimes, very rarely, usually after a compilation of a referenced library, I get the error with the message "Error parsing near '

    '". A page refresh would normally make it work, but being on and off like that made it very hard to debug.

    I have saved the page output in a file and when the error occured, I checked the output. It was a valid Ajax output, containing NO or inside. I am going to try the Session fix above, see if it fixes anything, but beware that the PageRequestManagerParserErrorException does not seem to occur only when the ajax output is corrupted, but also in some other cases.

  • The Session fix worked! Add a Session["Siderite"]="helped me" :) in Page_Load if not IsPostBack and this will remove a parse exception that appears out of nowhere when referenced components are being changed and the entire solution rebuilt (possibly when the Session is empty).

  • Good article... I thought that it was something like that. I have been using server.transfer because that was the way I was taught. :)

    Now I know how i was shooting myself in the foot.

  • So just for clarification, AJAX does not support the output cache directive? The reason I ask is one of my pages uses output caching, and I was using the update panel control and was getting javascript error about one out of five times the page was re-rendered.

  • Just wanted to reiterate a comment by Phil (thanks Phil, this helped me a lot). To see what content is coming back use the following in an end request handler for the ajax request: args.get_response().get_responseData();

    You can then show this in an alert box that that cuts off the text so what I ended up having to do is throw a div on the page and write the results of args.get_response().get_responseData(); to the innerText of the div. innerHtml wouldn't work.

    This can help you at least see what it being returned and see if maybe an error is being returned from the page which can cause this issue.

  • I am using a gridview in an update panel. My gridview contains two radio buttons placed in a template field.
    I get this error when I check a radio button and it does not appear everytime. I am not doing any of the things that you mentioned would cause the error but I do have server tags in my html page.
    When I check a radio button no action is taken place but when i hit the radio button in teh next row, first one takes action and then suddenly this error pops up.

    Please help. I have tried to do various things posted on the net but none helped.


  • I tried doing ScriptManager1.RegisterPostBackControl(rd1);
    I dint get teh error but defetas teh whole purpose of having Ajax.

    Please advise.

  • We have to remove some headers that could expose some 'sensitive' info, according to some big pentesters, so we implemented our SSL Proxy to remove the X-Powered-By headers and the ASP version headers, and guess what, AJAX does not work!!!

    Elion, mate is there any way to get around this. This must be very common?

    Please help.

  • I have this problem, have made sure I don't have any of the common causes listed above.

    (eg. response.write etc...)

    Can't determine whether it is a proxy (removing header issue)

    However I can only get this exception in Mozilla

    Does not happen in IE6, IE7, Safari, or Opera.

    Any ideas?

  • Ryk:
    You might want to look into an alternate solution developed by Jeffrey Zhao (see his comment here: I'm not sure whether it works for your scenario, but it's worth a shot.

    The Dude: An asynchronous postback (when mentioned in the context of ASP.NET AJAX) is one that uses UpdatePanels and updates only part of the page instead of doing a "full postback" and rendering the entire page. It's asynchronous since it is non-blocking. The request will happen in the background and still let the user interact with the page.


  • I have used two template fields in the gridview.Each of them contains a imagebutton. And the gridview is in the updatepanel. I think this might be causing the error we are talking about.

    "Call ScriptManager.RegisterPostBackControl() and pass in the button in question. This is the best solution for controls that are added dynamically, such as those inside a repeating template."
    Is this the only solution???

  • Just fixed this error in one of our webprojects. This started appearing when we switch from inproc to state server.

    I made sure that everything saved in session was serializable and have not seen the error since.

  • If you are using AJAX and receive this error, go to your form in markup mode and at bottom UpdatePanel´s section add a new Postback trigger secction and put then name of control where reponse.write is raised like this :


  • I have 2 update panels (1 nested in the other) on a form. I have all of the appropriate AsyncPostBackTriggers set up and it all works perfectly until I allow html into one of the form fields. A simple testing in one of the form fields will create this error for me. If I remove the html, and just leave the non markup text, works great again.
    So far I have tried moving the field that holds the html outside of the nested update panel, I have tried adding the Page attribute EnableEventValidation="false", I have ensured that I am not doing any of the things on the "avoid" list. I'm stuck!

  • This error is still occurring in the release version of AJAX 1.0 - I have a simple UpdatePanel
    and a timer to fire off if the session is new, the ip address is written to the SQL Database. No response.write, nothing that would modify the page after render, none of these explanations fit.
    This error is intermittent.

    Need a fix.

  • This is a strange one. I have a user control with AJAX tabs. Inside the tabs are other user controls within update panels. Those controls have nested Repeaters with link buttons in them. As it binds it generates the javascript: url property. I wrapped one of the calls to check permissions. If the user doesn't have permission it leaves the URL blank. Once I add that permission check, I get the Sys.WebForms.PageRequestManagerParserErrorException even though it does not alter the HTML at all. I'm using my user id and I have access to everything so the URLs are exactly the same with and without the check. I comment out the check and it works fine again. It doesn't matter what UpdatePanel is being rendered.

    I do not have any Response.Write, filters, trace statements or anything.

  • In my understanding about PageRequestManagerParserErrorException error and Trace, this will only happen If you have Trace enabled for your Page only.
    So for the case like this:
    If you change the pageOutput="false" than you won't get error (if it is just related with the Trace).

    I have find one workaround if you still wants to use the PageOutput=True (Trace written to the webpage. I am using the UpdatePanel and ScriptManager.

    When page Loads, We can check If the request is AsyncPostBack and we can disabled the Trace for that request.

    The way we can implement is something like this:

    protected void Page_Load(object sender, EventArgs e)

    Page.Trace.IsEnabled = false;


    Only dropback I know is, We will loose tracing for that particular Async Request.
    It is working fine for me.

  • I've found out what was causing me to get this error. I think it has to do with the conversation Shaggy & Eilon were going over. I had a button click event where I Loaded a usercontrol into a panel and thought that was the issue. In fact, it was me placing something into session in the click event that was doing it. ie.

    protected void btnOther_Click ( object sender, ImageClickEventArgs e )
    //Session["selectedservice"] = "other";
    LoadWebUserControl("other", Panel1);


    I don't know enough to tell you why that would do it, but it certainly was the culprit.

  • This is a very obvious error.

    Ray Akkanson

  • Eilon,

    I'm glad you posted this, so it took only minutes to find the problem and not hours or days! I have a Reports page in which I select a report name (or names) from a listbox a month/year from a dropdown listbox and then press Submit. By placing the Submit button (and only it) in an Update Panel, I get precisely the functionality I want ... except that I get this error when I try to use Response.Write to launch one pop-up window for each report selected.

    Is there no way around this?

  • I use UrlReWriter.Net to take and turn it into where n is an integer.

    The next page loads 9 dropdown lists inside an update panel that (get this) cascade in both directions(i.e. doesn't matter which one you select) and all dropdowns update to only show choices that match already chosen choices.

    If I leave as is, I get the error. If I add a trigger, e.g. , the error goes away but I LOSE the state of my dropdown lists. This breaks the application.

    Now, is this something for me to fix (any ideas?) or is it a bug I need to implement a work-around on?

  • It is very helpful for all. keep it up.


  • Please give me the solution for crystalreportviewer...
    updatepanel is not supporting export,print and zoom buttons

  • Hi when a button in a updatepanel (using a modalpopup) calls response.redirect("") on the server side code you will get the 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 ' <!DOCTYPE HTML P'.

    I assume the reason for this is whilst the modalpopup is trying to process the page the server side code is already trying to redirect the page to a new section. Is there a work around to this?

  • Follup to post:

    I found the solution:

  • Also , you need to check the Bandwith limitation in IIS.
    WebSiteName==>Propriete==>Performance==>Bandwith Limitation

  • "If you ask me, this error message is not all that bad."

    So funny! for a message that is everywhere on the web insides posts title "i've been a week trying to fix this with no results"

    It's the worst debug info one could... besides the fact that making a compression algorithm that cannot accept unknown contents is such an idiot thing to do...

  • I had a similar problem in https but not http. Finally after searching long enough and with FireFox and FireBug I was able to see where it failed when adding a cookie to the RoleManager. Setting <roleManager cacheRolesInCookie="false" in my web.config fixed the issue. Hope it helps someone.

  • I experienced the problem as well with the following scenario:

    Using ComponentArt Web Charts
    Web Charts inside PanelA
    Items being charted in a TreeView control
    Button in UpdatePanel1 to draw charts
    PanelB - Message to display if nothing selected.

    When the page loads, PanelB is displayed by Default. PanelA with the charts is hidden
    these are both in UpdatePanel2

    When the Draw Charts in UpdatePanel1 is clicked, Panel2 is hidden and Panel1 is displayed, then the charts are databound.

    Here's a Pseudo version of what I had:

    Panel2.Visible = False
    Panel1.Visible = True

    Now I was getting hte parser error, so just as a test I did the following, and it fixed it:

    Panel2.Visible = False
    Panel1.Visible = True
    UpdatePanel2.Update 'added this step
    UpdatePanel2.Update 'update again

  • I have the same problem that Dominick has.

    No Response.Write

    No Output Caching

    No Response Filters

    No Trace

    No Http Module

    No Server.Transfer

    Just an LinkButton in a GridView and Nested Master Pages.

    The LinkButton click only hide the GridView an show a Wizard.

    The error does happen every time.

    source grid view

    <asp:LinkButton ID="btnDelete" runat="server" CommandName="delsoal" CommandArgument='' >حذف

    <%-- --%>

    the source code

    if (e.CommandName == "showsoal")
    int i = Convert.ToInt32(e.CommandArgument);
    GridViewRow gr = GridView1.Rows[i];
    TableCell tc = gr.Cells[4];
    ScriptManager.RegisterClientScriptBlock(Page,this.GetType(), "Alert", "'showsoal.aspx?id=" + tc.Text + "', '_blank', 'width=700, height=400, resizable=0, menubar=0, scrollbars=1')", true);

  • This was EXTREMELY helpful. Amazing how that one little line can cause you so much pain and suffering. Much thanks!

  • Hi Eilon,

    I use AJAX Update panel with a text box and button. I get the Job number as input and do some DB operations, once the button is clicked and
    show the result to the user by throwing exception. The page runs fine, while I browse in the machine where I have hosted the site.

    But I am getting script manager exception with error code 500 for all the AJAX components, I have used throughout my application, when I use browser of some other client machine. Everything works fine in the browser of the server.
    I use IE 7.0.
    Can u help me please?

  • Eilon,
    We are having this issue but have a unique problem with it. We use a third party application for authenication called CoreID. When a user sits to long at a page and times out CoreID redirects the user to the login page. Because the updatepanel response is receiving the login page instead of what it expects we get this error.
    Any ideas on how to work around this?

  • Thanks for the post, it was bang on, even nailed doing a server.transfer() opposed to response.redirect() because of being used to the Classic way (which was my issue). Short, accurate, and to the point, which is ridiculously rare IMHO when hunting for Microsoft programming help.

  • I discovered what appears to be a new potential cause for this exception. In my case, I had the following:

    public string GridViewSortExpression
    return ViewState["sortExpression"].ToString();
    set { ViewState["sortExpression"] = value; }

    The problem is with line #5...if my ViewState["sortExpression"] variable was ever null, an error was being thrown but not handled and thus firing the PageRequestManagerParserErrorException error.

    My fix for this was simply this:

    if (ViewState["sortExpression"] == null)
    ViewState["sortExpression"] = "in_track_num";

    That eliminated the PageRequestManagerParserErrorException.

    Hope this helps.

  • I also received this error when rendering Update Panel, imagine we have to deliver our Web application using AJAX technology to 7000 employees but it turned out not happy on the first launched because of this intermittent error. We consider the behavior of the browser, because some workstations are not receiving error while others are. Two options to solve the problem 1. uninstall yahoo toolbar in IE (remove it permanently) then reset the pc and 2. Don't click too fast on the controls that exists in the update panel wait for a few seconds. I hope this would help ease your burden.... but if you ask me I'll not recommend to use the AJAX because its not stable yet till such time new version will come that address all the issues. Thanks Pogi Prax

  • disabling norton toolbar solved my problem

  • I am having this error also, and think I have found the problem:
    The request headers on the HTTP Request Post include: "Content-Length: 0", even though there is some ASP.NET request data in the Request Body.
    The 0 length is making the page act as simple POST, with no events triggered or AJAX stuff: it just returns the full html.

    I have a fairly simple test case, which for some reason requires IFrames.
    Where/to whom should I send the test case?

  • hi,

    I have been following this blog since couple of days as I was also facing the same issue. In my application, the first time the page loads from the server I used to get this error. When I used to refresh the page or click on some other link and come back to the same page, I never used to the error back again. The problem was with the session settings in web.config. I changed the cookieless setting to cookieless="true". Previously I had this set to "False". Now after I set to True everything works great. Thanks for the useful information on this blog.

  • Thank you, it was Server.Transfer causing all the problems a quick alteration to Response.Redirect solved it.

    For info:
    Server.Transfer is used for security to stop hakers altering page redirection outside your given server, though it does have the additional affect of not storing brower 'back button' history, unless you implement your own.

    Thanks again.

  • I found that if you try to hide controls during postback before the page is rendered again, this can cause the error message to appear.

    Hope this helps someone...

  • Remove my last post. Apparently that didn't resolve the issue.

  • Okay, this resolved my issue. My form worked fine with 1 UpdatePanel. When I tried using 2, I kept getting this error message. After I removed the second UpdatePanel, my form worked fine again. Any thoughts?

  • Sorry for flooding your board with the earlier posts. Apparently, my Submit button cannot be placed inside of an UpdatePanel.

  • Very useful blog. One of my FullPostback control was reverting back to AsyncPostback and hence I had this issue. Making sure that the control is set to AsynPostback on all postbacks, fixed the issue.


  • Hi,

    Regarding my last comment, I post here for your information the fix provided by a system administrator that was looking at this problem:

    There was a non-standard HTTP header X-MicrosoftAjax which was not allowed by the reverse proxy. I defined a exception for that header and now it seems working.

  • i am using the below code to export data but i am getting the below error
    Windows Internet Explorer
    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 'System.IO.StreamWrit'.

    Dim _strTable As New StringBuilder

    _strTable.Append("Daily Report")
    _strTable.Append("Start Date : " + DateTime.Now.ToString("dd/MM/yyyy"))
    _strTable.Append("End Date : " + DateTime.Now.ToString("dd/MM/yyyy"))

    Response.AddHeader("content-disposition", "attachment;filename=DailyReport.txt")
    Response.Charset = ""
    Response.ContentType = "application/vnd.text"
    Dim stringWrite As New System.IO.StringWriter()
    Dim htmlWrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite)
    'System.IO.StringWriter(stringWrite = New System.IO.StringWriter())
    'System.Web.UI.HtmlTextWriter(htmlWrite = New HtmlTextWriter(stringWrite))


  • I had this issue:
    - Sys.WebForms.PageRequestManagerParseErrorException message was shown in my app when I left about 10 minutes without clicking anywhere, otherwise everything worked ok.

    I solved it changing server idle time of my app pool on IIS. It was only 5, so I incremented it and now works ok.

    (Sorry for my english and greetings from Spain)

  • search your site for any calls to Trace. .. it fixes the problem

  • I was getting the error 500 only on CLIENT computers when I tried to pull information from database and display it via gridview... turned out that enabling database access for all users and not only admins in database's security settings solved the problem. now I don't get any error messages on clients.

  • Hey guys, you might be recieving this error if you'd downloaded the supposed "fix" for Validator controls to work in an AJAX UpdatePanel ( - look a little bit down the page.

    I warn you, do NOT use this! Do not implement "tagMapping" to fix your Validators, instead, use a "control reference". The control reference will allow you to use both the standard validators with no UpdatePanels, but when you are using UpdatePanels, then you can use a different prefix for those validators. Then, when the "offical" release that fixes these validators comes out, just doa search and replace in your site and you're done. I did this and I am no longer receiving these errors and I can do response.write whereever I want.

    Add this to your config instead of the tagMapping:

  • We faced the same problem more than once; this occurs because the AJAX sends the length of the response, but for some reason the response has another length, so it fails. We tried with the multiple solutions in many sites (a new session, an asp:label before, ...), but the only solution is to check the real response of your call. For example, if you have a grid inside the updatepanel and refresh the UP but do not do a databind() in the grid, the expected response will be shorter than the real one (the same for dropdowns, on-the-fly labels, etc.). Check the exact response of your AJAX call. This is the only solution (for IE use DebugBear which shows the result of the AJAX response; in this case we can saw that some asp controls were not filled and the ajax response fails).

    Greetings and sorry for my poor english! =)

  • What a wonderful solution.... HttpModules just don't use them.....quite

  • Hello Eilon,

    I have a page that uses a masterpage with the following:

    Masterpage has a silverlight usercontrol.
    The default page uses the masterpage and has an Accordion with 5 panes.
    Each pane with the exception of the last has a web user control.
    Each web user control has a repeater with a series of lintButton controls.
    The accordion is placed in an update panel. The update panel has a roundedcorner extender.

    Now, I call the server.Transfer(page, true) within a clicked event for the linkButton in these usercontrols. The destination page page_load event runs, but does not display and I get the Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it error.

    I have attempted using the EnableViewStateValidation = false and EnableViewStateMac = false settings to no avail.

    Please Help.


  • One thing to try is to call your button events using javascript. Check out the example below.

    //Code Behind
    btnSubmit.Attributes.Add("onclick", "setSubmit();");

    function setSubmit() { _doPostBack('btnSubmitClick', '');


    // Aspx page: bottom of page

  • Here is a novel thought try writing software so people dont get this error you freaking idiot ! Wait that makes sense and nothing Microsoft does makes any sense! I cant wait until visual studio is dead a fate it so dearly deserves!

  • Hello,
    I have a ajax page, which is working fine if I open the page directly.

    Now I am referring this page URL in another applicaiton Iframe, to display this page.

    Click on Ajax button i am getting the error: sys.webforms.pagerequestmanagerparsererrorexception

    Any idea? why it is failing when i refer this page in another application web form (using Iframe)?


  • I was having this problem, but only under Firefox - and not on my dev computer.

    It turns out that ASP.NET was configured to store session state in cookies and Firefox was configured to not accept any cookies. Altering the session state management for ASP.NET in IIS did the trick.

  • Hello,
    i have figured out the problem with installed Response Filters like GZipStream.
    If EnableEventValidation of the current Page-object is true, the PageRequestManager installs an own filter(NullStream) as wrapper to the old filter. The problem is that they haven't implemented Dispose(true) on NullStream, so it doesn't call Close() on the old filter. But the GZipStream needs to be closed at the end because it's buffered and need to write its last block there. Who can i ask for providing an update, Microsoft?

  • this is frustrating... with this design, pages that have updatepanel become very limited. I would like to include some AJAX features in MOSS but I cant because of that.

    The control itself offers a very nice feature but unfortunately poorly designed.

  • I had this problem with the first release of AJAX, and turning off event validation.

    I then change the build properties of the site from v2.0 to v3.5, which altered the web.config; changing it back to v2.0 started the problem again (even with validation turned off).

    I then put it back to 3.5 and it works fine - I think Microsoft must have fixed something.

  • hi, in my client site its not showing but my client getting this message they got “thin Client Environment”
    i didnt use Response.Write(). but still getting my client following 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 ‘

    can anyone tell me whats the reason?? its urgent

  • I got this error while doing some coding that didn't actually require a Response.Write, but the UI worked a lot better if I did it that way. It's a modal popup in an iFrame that needs to do something, and on success it writes out javascript to close itself.

    The page uses several updatepanels to update various parts of the form, then on AddToCart it does a complete page postback.

    I got this to work by putting this in the update panel that caused the page postback:

    Hope that helps someone.

  • Thanks - I was using a button in an update panel to kick off a Crystal Report via an ExportToHttpResponse call to open the report as a PDF file. One of the arguments to the function is the Response object. I got the parser error exception until I added the postback trigger as mentioned in RiskyT's comment.

    This is the reason I keep using and recommending Microsoft's products. I was able to find this solution to a nasty problem in just a few minutes of Googling. I feel comfortable I won't be left out there dangling in the wind. Great job all!


  • I had this exception and it turned out to be because of how I was using a MultiView. The UpdatePanel was on one of the views in the MultiView and I was setting the active view in my page's OnPreLoad event. Moving the view-switching code into OnPreRender solved the problem. Rather bizarre, but I hope this helps someone!

  • Hello.

    I have this error on my production server win2003 sp1, and not on my test server win2003 sp2.
    Can it be related ?

    I have check the IIS settings and they are the same.

  • In the code behind the error happens with:

    String strFileName = fileField.PostedFile.FileName;

    I want to upload an image in the update / insert Listview.


  • Tuesday, March 13, 2007 7:53 PM by Simon <--- THANK YOU!

  • I have this issue: Sys.WebForms.PageRequestManagerErrorrException:An unknown error occured while processing the request on th server. The status code returned from the server was:500

    Happens every time I send an email message from my ASP.Net page.

  • Thank Simon, saved me loads of hours. Thanx!

  • FINALLY got it! None of the above solutions fixed my problem...I had to change an IIS setting - Configuration --> Operations --> Default ASP language = JavaScript (used to say VBScript).

  • Webpage Script Errors

    User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
    Timestamp: Sat, 15 Nov 2008 11:16:33 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 'Title||ASP.NET AJAX|</s'.
    Line: 6
    Char: 9278
    Code: 0

    i am getting this error. even i am not using any type of response.write() method not a server.transfer(). but still the problem exists.

  • If you turn on partial-page rendering in DotNetNuke you may get this error because DNN is wrapping the module with an UpdatePanel. You can probably fix the problem by calling code such as this in Page_Load:


    Where is the control that needs to do a full postback.

  • I had the same problem when trying to add/update a session variable. I fixed this by adding a placeholder variable in Page_Load. It seems like once session had been accessed I did not get the error.

  • This is file upload error

    Details:Error parsing near'%PDF-1.5
    40 ob'

  • Thank you for the information!
    I was having this problem because I was adding a cookie to the Response, but after I removed that code, the problem persisted. The solution: I did a regular postback and removed the UpdatePanel.
    Anyway, it was very userful and intersting post.

  • Thank you. This helped a lot in my Excel exportation using a gridview within an update panel using a master page. It was difficult to resolve, but fortunately it worked.

  • I am experiencing the same issue with my website. After adding to the web.config file at the problem seems to be that the site is being hosted on a webfarm and the SessionState is being encrypted using the MAC Address. The issue with webfarms is that the EnableViewStateMac is by default set to True which causes problems.

    In the web.config I changed the tag to
    I also added
    EnableEventValidation="false" EnableViewStateMac="false"

    to the <%@ Page ... directive of the aspx pages.

    These two changes to the website solved my issue.

  • I get this error message on only 1 user's machine. Any software problem on that machine?

  • I am using Visual studio 2005 and ASP.Net ajax enabled web site. After saving data more than a time i got this exception.

    " request manager server error exception:An unknown error occured while processing the request on server. The status code returned from the server 403"

    can any body help it out

  • I began to have problems when I installed Ionic's ISAPI rewrite filter on IIS and wrote some "unsafe" rules, hence the errors didn't appear on the development server.

    I suspect absolute/relative paths issue. Once I commented the aforementioned lines, everything works fine now (except redirection, for now).

    In case anyone missed that...

  • The problem can also occur when you have wrong rewrite rules in isapi filter on IIS (e.g. Ionic's).

    Once I commented the problematic lines, everything worked fine.

  • Great post. I understood what you meant. But what I am doing I did not know how to accomplish by not writing response.write(). I am trying to play a series of fies in a sequence files of diff types meaning flash, pics, wmv files. and depending on their type I am writing that emebed code thru response.write.
    How do I accomplish this with tou writing direclty. Can I place these controls somewhere direclty on the form i.e. in the update panel so that I an just make visible true/false etc.? or I will place them in thier individual divs that I will show and make invisible. There has to be a way to do this. I am relatively new to ASP.Net and AJAX but not new to programming. So if you give me a hint I can catch up.
    Thanks again

  • Server.Transfer, Always write outside UpdatePanel.



  • Try to Add

    in the web.config its for ajax 1.0 version
    for other Ajax version just change "Version" you are using and "PublicKeyToken"

  • I had the same error, tried all the solutions listed, what ended up fixing the Error for me was adding the following to my Web.config file:

  • I've seen this happen if an error occurs during postback.

    For me, it was a SQL Server error (EXECUTE permission wasn't assigned to a SP).

    To figure it out, I had to add a PostBackTrigger to the submit button--then I was able to see the SQL error. Once I fixed it, I removed the PostBackTrigger and everything worked fine.

  • I tried all solutions but still getting the same error.Please provide me any solution.Its working fine in IE7 but not in Firefox.

  • I am using two user controls (u1 and u2) in a page. In u1(completely written using xmlhttprequest), I have a dropdown and say user selects something and in u2 I have a grid and say user is selecting a row and during the selection it posts back to display some values in u2 itself, during this post back it resets the value that is already selected in u1. To avoid this, I placed both u1 and u2 in two different update panels, it works fine for the first time when I select a row in the grid view but when I select another row it doesn't work. It comes up with Sys.WebForms.PageRequestManagerParserErrorException with error code 12152.

    Any clues??????

  • mine is ajax based webapplication,
    I requested the URL in different systems, both places are working fine, but here if I redirected to other pages on both sessions/systems, this time here I selected the one of the option in combo box in sessionA, in sessionB internet explorer I got the Sys.WebForms.PageRequestManagerParserErrorException .

    here I am not using any



    -Server Traces

    please any one help to resolve this issue.

  • This is true. I was getting this error on a page with an update panel, removed the response.write code and the error went away.

  • I was also hitting this recently. I was trying to do some integration of AJAX with some Sharepoint bits. What I found was happening was in my case my code was hitting an exception on the server and sharepoint was replacing the response with an Error page but not actually redirecting to a different page. So while my page only expected a partial page in the response, it got a whole page (not a redirect just a full page response). My error also indicated <!DOCTYPE ht'." My guess is that for all of you hitting this, somewhere in your code it is trying to send back a full page response instead of just the partial UpdatePanel update. I don't know all of your scenarios, but perhaps that will help you. Hope that helps. I have opened a dialogue with Sharepoint guys on adding detection for partial page updates and do a full redirect in those cases (or something that works)

  • I'm also getting this exception on click of link button inside a view of a multi-view control which is inside updatepanel within repeater. I think, I need to call ScriptManager.RegisterClientScriptResource() to fix this but not sure how to do it. And I need for AsynchronousPostback only, AsyncPostBack=true.

  • Set the attribute MaintainScrollPositionOnPostback="true"
    in the directive

  • Rule Number One
    If a feature isn't complete: NEVER CODE IT HALF WAY!!!!!

    I have many times come across code where you typical junior programmers have written something half way and it gets released into the commercial environment. I consider this the same as you coming from the bathroom without washing your hands. It is VERY! BAD! FOR! MICROSOFT'S! REPUTATION!!

    Ofcourse, you work for Microsoft (directly or indirectly) and you have that "I WORK FOR MICROSOFT" arrogant attitude.

    Well guess, what... your economy has crashed. What do you have to say for yourself now?

    I'm DONE with you people.

    Now go code something truely complete and help the rest of the world.

  • Still gettin this error. The page is working fine on local machine but giving the below mentioned error on remote server
    (godaddy hosting)..
    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 'itle||Untitled Page|</s'.

    Please help...

  • Thanks Ronald, your solution worked for me!
    In the markup for the updatepanel, add this code, with a PostBackTrigger for each button that causes the error:

    I put this just before the code.

  • any update on this error?... do you have new version for this update panel....

  • Hi I just found out another solution to the error.

    Remove the export to excel button in the update panel.

    After putting the button outside the update panel, the code works fine. :)

  • My page is working fine in windows XP Enviorment but same page was not worked on Windows Vista Enviorment. It gives me the same error. I have master page with update panel added in the page. Please guide me to resolve the same.

  • i have a button and i would like to oc conditional asynchronous PostBack i.e i want to do asynchronous postback when user is not logged in and show login popup and if user is logged in i want to do normal postback and return value using response.write(). how can i do this?

  • Weird thing is some user (out in the world) encounter this and others do not... not sure why that would be. Is there some sort of Java setting that could cause this issue I wonder?

  • Placing the button outside the update panel solved the problem. Thanks you !

  • I'm using Forms Authentication and AJAX Update Panels and got the same exception. By configuring , my problem was solved (thanks to ChrisS in this forum).

    It seems that adding roles to the encrypted cookie confuses AJAX when performing asynchronous postbacks and the complete HTML is sent to the client. AJAX is not able to parse the complete HTML and throws the exception.

  • My case is tragic.

    I have an aplication web in a server, wserver2003, asp 2.0, ajax. i haven't problems from the extranet, but from intranet i get the error.

    The error appear in some pages, and in some buttons, is not always. It´s very strange, because from extranet it's ok.

    I did a proof, i connect a laptop directly to server (AS LAN), and i don't get the error.
    i think is something with the firewall, but i don´t know why the error only appear with some buttons and in some pages.

    I create another virtual directory with the same web page files "MiWeb2", its works ok. But with "MiWeb" i get the error.

    Someone help me

    I'm confused

    Someone help me.

  • One solution:
    I have a gridview with javascript wired up for the CustomeValidator. Had:
    if (ddlParentVal == 'CostCode') { args.IsValid = false; return false; }
    args.IsValid = true; return true;

    DO NOT use "return{ true| false};"
    Only use: args.IsValid = true; return;

    Somewhere that true|false is really making something angry....

  • @Mark C, I trawled through my code on the off chance that I too had misspelled a css class, and I had! Renaming to the correct spelling made the error go away, so for that many thanks.

  • I am experiencing problem with Crystal Report Viewer in the Update panel and printing. Anybody knows workaround to this ?

  • We are facing same problem. We have upgraded to .Net Framework 3.5 sp1.
    Application runs fine in anonymous access, problem is only with windows authentication.
    We receive same error with description :

    error near '<html...

    Can you please help us to resolve this error ?

  • I am getting the same error when I am uploading to the live server. On local system it works fine.

    Pleas help me to fix it up.

  • i solved the problem with postback trigger too.thanks..

  • I have the same issue that "-R" reported in this thread on October 18, 2007. I have a Gridview that allows users to Edit rows. The only time I get the error is when the user enters any kind of HTML tag in a textbox in the row being edited. Like, if the user enters "some text" in a textbox, then the error shows immediately when the user clicks on the Update commandbutton (and I just tested it and it also shows the error if the user clicks on the Cancel command button after entering HTML code in the textbox).

    If anyone has any advice for this causing the error, I would really appreciate it.

  • just added a session variable on the Page_Load (!IsPostBack)... its working. Thanks guys!!!

  • Great article... I was stuck with this for 3 hrs because of which an update of data list will not happen when I delete.

  • The solution that worked for me was no output caching for .ascx files on the server. I had output caching enabled for .ascx files. That caused the problem.

  • My website is working fine without this mysterious error.

    I solved the problem by moving the Button that contains (Response.Redirect) command outside the UpdatePanel.

    Hoping this works for other people.

  • thanks... point #2 did the thing. !

  • Thnx Mark ... that really helped me ;)

  • Hello All

    I am getting this error Sys.WebForms.PageRequestManagerParserErrorException in Update Panel. In my update panel i have added datalist and timer control outside update panel. I am retreving the random values in my datalist after 10 seconds. But after 15-20 mins this error pop up in my website. Please help me in this issue i am completely fed up of this.

  • Hello All,

    I have also faced the same Issue when I tried to redirect from listing page to the details page. I have added Update panel to the listing webpart and deployed to the sharePoint server. When I click gridview row, it executes the redirection code and thows the error.
    To solve this issue I have been through the web.config file of the sharePoint application and Identifed the Issue. In web.config file , the entry related to Webextensions under " " section ""

    and guess what, The issue has been resolved.


  • Thanks to everyone, after paistaking hours and trying a number solutions from this blog, i eventuatlly dicide to add this:

    Worked amazingly no problems now.

  • Thanks! I took the updatepanel out of my page and now my download links work properly.

  • Has this issue been addressed in the new release of VS 2010?

  • For the SharePoint developpers which are trying to integrate Ajax into a standard webpart and who encounter this issue: Check the other webparts already added into the page. The error may occurs due to extra other webparts.
    In my case a Search webpart was on the page and made crash my updatepanel async postback.
    If it can helps.

  • Thank U Eilon. I solved my issues based on your suggestion.

  • no one solution work for me.
    just one to add my update panel contain table with runat="server"

  • Is there any fix for this issue on the client side ? My provider is saying that the issue is on my side.

  • Try this code

  • You can solve the 404 status code error by writing the page forms action attribute to that of
    as to which one works fine for you.

  • I am calling a pdf from an updatepanel And I got this error. I added this code in the repeater_ItemDataBound and now it works like a charm :

    ScriptManager scriptManager = ScriptManager.GetCurrent(Page);
    if (scriptManager != null)

  • It wont work; I tried everything... got the same error!!!!500 from 2007 to 2011, I could not use the Update panel, even in VS2008 same experience. Please anybody, share what you have.

  • "If you ask me, this error message is not all that bad. After all, I'm the one that made it :)"

    Classic - love your dry wit!

  • I'm using Visual Studio 2010 / .NET 4.0, with URL Rewriting, and was getting this. Actually, I would make a change, recompile, and then start getting the error for a couple minutes, then it would suddenly work again.
    Turns out I had tracing turned on, with a 90 second timeout.
    Once I removed that from web.config, the error went away.

  • Try this
    if you have it on master page

    2/ on every page that you have your update panel control with the proxy manager then
    place on the top of your page this

    Remember EnableEventValidation="false" Trace="false" validateRequest="false"

    3/ Go to your WebConfig and add this

    if you alrealdy have it remember to add cacheRolesInCookie="false"

    4/ Sit back and get 6 pack of Bubwizer or Heneiken or whatever you prefer and drink all the way and watch if it die. I have tried till I drunk and then wake up but my web still up and going strong ....!!!

  • Hi Eilon

    Thanks your solution worked:) I moved the excel export button out of the Update Panel and Bingo!!! it Works!!! Thanks buddy...

  • I was getting the error when exporting grids to excel from pages using master pages. I tried all of the above but none of it worked for me. In the end I got around the problem by re-opening the window from the export button click event and passing an 'export' flag in the query string. This meant the call was no longer a postback and the problem disappeared.

    eg. - in the button click event:

    string LScript = "'thispage.aspx?DoExport=Yes','_self');";
    ScriptManager.RegisterClientScriptBlock(BtnExport, typeof(Page), "MyScript", LScript, true);

    and in the page load:

    if (!IsPostBack)
    if (Request.QueryString["DoExport"] == "Yes"

    Your DoExport method contains what was previouisly in the export button click event handler.

    Thanks to Eilon and everyone else who posted fixes. Hope mine helps someone too :)

  • I've solved my PageRequestManagerParserErrorException errors

    Write below code in Page load()
    { this.ToolkitScriptManager1.RegisterPostBackControl(this.btnProjectDownload);

    Note: my page had the Buttons initiating the UpdatePanel refresh outside the UpdatePanel, and that I declared an PostBackTrigger in the UpdatePanel for each Button Click event.


    Sushil Kumar

  • ScriptManager scriptManager = ScriptManager.GetCurrent(Page);

    if (scriptManager != null)




    This code resolve this problem.
    Register nested control causing postback in this code.

  • Just found another workaround,as I had no luck on none of above symptoms/solutions:

    Pipeline mode change, integrated to Classic mode.

  • Same problem, after moving controls around page (cut and paste). Solution: remove all copied controls and add them one by one from toolbar. Everything works like a charm.

  • Hi,
    In my case, I just forgot to add a button to PostBack trigger in UpdatePanel, so this is caused an error when the button clicked.

  • I don't understand most of this. Is there maybe a page like this but with more detailed instructions for someone who isn't an ajax expert? I was really lost most of this article but still have the problem.

  • While parsing data in parseDelta method, at the condition(replyIndex + len) >= reply.length sometimes getting error. What would be the reason for it.

  • Can we use multiple update panel with timer in a single page of ASP.Net... VS2010

  • change target platform of solution to 3.5

    GO solution > Right Click > Property Pages > BILD > TARGET FRAMEWORK

  • I'm creating a spreadsheet to send back to the client. It's a long process, so Im uins the updatepanel and updateprogress to show the user that something's happening. I'm getting the error based on sending the spreadsheet back to the client. How can I send a file back to the client without generating this error?

Comments have been disabled for this content.