AJAX Toolkit and Mixed-mode Authentication

by Jim Aug 31, 2007 12:55 PM

Your IIS security settings can cause you to get the dreaded PageRequestManagerParserErrorException.

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 PUB'.

We have a forms authentication site with a single windows authentication "internal login" page; this single page is configured through IIS with anonymous access disabled. The rest of the site has both the anonymous AND windows boxes checked.

If the Integrated Windows Authentication link is not checked on our server, we get the parse exception - but only in IE (everything is fine in Firefox.) Also, if I run Fiddler while accessing the site, it works fine! Presumably Fiddler is doing something that modifies the request, or changes some sort of security negotiation, and this makes the problem go away.

The HTML returned from the request is the whole of the target page, rather than the partial postback that was expected. The problem is not that the request is redirected to a different page. The target page is just failing to reallize that a partial postback was expected, and is rendering the whole page. This can happen when a firewall strips the X-MicrosoftAjax header, but that wasn't happening here; I confirmed that this header did make it to the target page.

So I still don't know exactly what was happening to cause the parse exception, but at least I've got a fix.

Tags:

Comments

2/7/2010 1:00:23 PM #

Jim

There are a lot of things that can cause this exception. The first step is to find out exactly what is being sent back to the browser. Use Fiddler or a packet sniffer (like www.download.com/.../3000-2085_4-10739377.html" REL="nofollow">OmniPeek) to look at the traffic.

Jim

2/7/2010 1:00:23 PM #

nguyen quyen

Hi Jim,
Thanks your post, I found it through Google. I have problem like this. But I try and the problem still there. I tried do many things like on forum of ASP.NET show but still not working.

nguyen quyen

Add comment


(Shows Gravatar icon; will not be displayed)

  Country flag
Click to change captcha
biuquote
  • Comment
  • Preview
Loading