A bad day for ASP.NET AJAX

The post I just wrote was sucked into the ether and required me to login again. It's at least the tenth time I've logged in today to this site or the blog site. Clearly they're having cookie issues in the upgrade.

Anyway, we tried today to deploy a project today to another server, after testing it on several others, and our local machines, for several weeks. On the new box, the scripting pieces that wire up RequiredFieldValidators, as well as the initialization stuff for AJAX, was not rendering in the pages. I mean, the same code is generating different markup on two different boxes. It's incredibly frustrating, because the validators don't work, and there's a Javascript error around the AJAX pieces.

You'd think, "Duh, AJAX Extensions aren't installed." That would be plausible, but the ScriptManager control is on the pages, so if it weren't installed, then the page would fail outright. Instead, it's executing, but missing important pieces. web.configs are the same other than the database connection strings.

We opened a ticket with Microsoft, and the first guy couldn't help. They transferred us to an IIS person, which I didn't understand at all. Now it sits with someone in the AJAX group.

The overwhelming theme with the AJAX framework, for me, has been that it just doesn't do the "xcopy" deployment thing very well. It's very frustrating. I hope in the next version of the framework, when it's no longer an "extension," so you don't need several dozen lines in web.config.
 

5 Comments

  • I can understand How painful it can be when deployment fails that badly

  • Migrate to somehing other,like extjs+jquery-it has no server side dependences and I think it's more proper approach in long run than any AJAX.NET.

  • How exactly is that advice supposed to help me now?

  • Two things to check:

    1) Make sure the xhtmlconformance setting isn't set the "legacy" in your root web.config/machine.config. This causes problems with ASP.NET AJAX, and could be why you are seeing different markup be generated. Details here: http://weblogs.asp.net/scottgu/archive/2006/12/10/gotcha-don-t-use-xhtmlconformance-mode-legacy-with-asp-net-ajax.aspx

    2) You could potentially be having problems with how how ASP.NET AJAX is registered on the machine. Chris has a good blog post to check here: http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx

    In general, assuming ASP.NET AJAX is installed on the remote server, you should just be able to xcopy the application to it. No additional registration is required.

    Feel free to send me email if you still have problems.

    Thanks,

    Scott

  • I was just about to do a follow up post. I found the difference in the root web.config about 15 minutes ago, and it was in fact the xhtmlconformance tag. Someone should really think about doing a KB article for this one.

Comments have been disabled for this content.