Welcome to Tech-Review.Org Sign in | Join | Help

.net_2.0

My coding blog entries. Typically will either be more complex coding examples or overcoming product issues / troubleshooting resolutions.
MSFT Ajax: Sys.WebForms.PageRequestManager...server could not process

First off thanks to the ASP.Net team for assisting me in tracking this issue down.  I had the fortunate ability to run over to Matt G's office (Thanks Scott) and actually demonstrate my issue.  I hated to take up any of their time, however, 48 hours after install of the new BETA my programming was halted becaue of tons of Sys.WebForms... errors.  Feeling a bit - well getting to go to the 'big guys' - and in the back of my mind I was wondering "what if it was something I just should of known"...However, they couldn't have been more helpful and generous in their time.  Again big thanks to the folks at the ASP.Net team.  So, here is the recap to my problem and the solution

The problem: Constant [Sys.WebForms.PageRequestManager..server could not parse the request] with use of ajax , CTP and / or toolkit - for no explicable reasons...

Scenario:  You have Dropdownlists, UpdateDatePanels, Buttons, and a ModalPopup.  Maybe you have some or all - this was just my code. 

Symptom 1:  Modals would popup but any buttons clicked would return the [Sys.WebForms.PageRequestManager..server could not parse the request] error.  Any buttons inside just an UpdatePanel would do the same. 

Symptom 2: A second symptom of the scenario, say you have a gridview you use inside an UpdatePanel.  You have a couple of dropdownlists for sorting the data and when you select an item in the gridview it brings up a ModalPopUp... 

You select a item from the DDL and you get said before error and the page doesn't change to reflect new records.  So you select a entry anyways...the page sorted data that you previously selected NOW appears during the Modal.Show()....

 

The issue was identified as being caused by having TRACE ENABLED.  Turning off trace returns expected ajax behavior.  The reason - as I was explained- is that the trace feature actually intercepts and buffers the request to a degree so it can append the data, format etc...using response.write ..The error message admittedly does not indicate where to look (who would of thought of trace? )...but by turning  off trace - you can code and get the expected the behavior you expect

If in fact that you do have trace OFF - make sure you check your pages, controls, and web.config.  If still off, check and make sure no control uses a response.write is in your page.  I have no idea why it causes an issue - it's merely just how currently the Microsoft Ajax engine works...

Expected changes in future releases will maybe include at least an actual error message stating that trace is on until some other mechanism can be worked out...While the issue maybe a bit of a bugger for those whom do context.trace.writes to track program flow...at least in the interm one can still take advantage of ajax and the new Beta......

 

Again, ASP.Net team thanks for the assist  its appreciated much....

 

Posted: Monday, October 23, 2006 5:35 PM by Jody

Comments

No Comments

New Comments to this post are disabled