I haven't blogged about it, but I'm using AJAX.NET Professional for an AJAX screen in the application I'm working on... I love the library and I'm impressed with what Michael Schwartz has put together.

Here are a few links:
Okay, I guess one criticism I'd have for Michael is that it would be nice if there was a 1-stop shop website for his AJAX.NET Professional stuff... it is kind of frustrating that I need to have so many links for him.

But anyway... I posted some stuff on his Google group last week when I ran into an interesting problem. I'm the only one to respond thus far, but I found the solution on my own -- so no big deal. Here's what I posted (View the Google group thread):


From: Jeff Handley
Date: Fri, Feb 24 2006 1:23 pm


I have built a web form that uses several different AjaxMethod calls. Some calls accept no parameters. Some calls accept a series of scalar values parameters. Other calls accept custom classes/types as parameters.

Running locally, everything works just fine for all of these different calls. However, we have deployed out to our testing environment, and only one type of call succeeds -- the ones that accept no parameters.

Any AjaxMethod calls that I make that accept parameters fail with the error, "Parameter count mismatch". I believe this exception is the result of the Reflection call that is made to invoke my AjaxMethod.

Again, calls that accept no parameters work just fine on the test server. And locally, everything works.

Any help would be greatly appreciated.


From: Jeff Handley
Date: Fri, Feb 24 2006 5:04 pm


Okay, I have narrowed this down some. I downloaded the AjaxPro source code and I've put some code in to spit out information when the parameter count mismatch exception occurs...

This is a POST and for some reason the InputStream is empty, and therefore the parameter values cannot be read in.

I will keep digging...


From: Jeff Handley
Date: Sat, Feb 25 2006 12:41 am


Okay, I found the root problem and the solution.

Here's some backgroun to what generated the problem:

My application requires NT Authentication. But I was experiencing problems with Firefox when the XmlHttpRequests were made through Ajax.NET Pro, and Firefox was repeatedly prompting for password when Ajax calls were made.

So, I created an empty AjaxPro folder at the root of the application, where the Ajax.NET Pro calls will be made through. In IIS, I had updated that folder, allowing for Anonymous access. On my local workstation I left Windows Integrated security turned on too. But when the deployment guy on my project team set up this folder, he disabled Windows Integrated, leaving only Anonymous on.

The following blog entry (which has a link to MS KB) explains what happens when you have mixed security mode:

David Wang's Blog Entry

I ended up finding that XmlHttpRequest posts into the AjaxPro folder had Content-Length of 0, even though the core.js was setting this header. But if I hacked core.js to send the request into another folder in the application, Content-Length was set correctly.

In the end, I need to turn Windows Integrated on for the AjaxPro folder, but also leave Anonymous on to get around the Firefox issue.

What a fun day this was!