ASP.NET AJAX is a P.O.S. designed by naive Microsoft-universe programmers.
(Update 3: Ok, so the outlandish headline probably roped you in … Make sure you read all the way to the bottom, and watch for the follow post on its way soon)
ASP.NET rocks.
ASP.NET AJAX disappoints me.
Well, that’s my personal opinion right now. Let me demonstrate. Feel free to follow along at home and tell me how you go. I’m using v1.0.61025:
First, start by creating a brand new “ASP.NET AJAX-Enabled Web Application” in Visual Studio:
Keep the default, template supplied code. Do not change anything from the defaults.
Change the project to use IIS so it can be accessed from the Mac (the built in server – Casini – is useless if you actually want to test your work in even a semi-adequate collection of browsers because it only accepts connections from localhost):
Run the project in IE7 to check it all works.
No server errors, no JS errors. Schweet:
Open Safari 2.0 (a browser listed as being supported by MS):
Open the debug console:
Load the page. Boom! Crash! Bang!
Yeah awesome – thanks guys. Champion effort.
Are we the only company who actually test our work properly? And no, this isn’t a blind case of “must support everybody for the sake of web standards”, this is a business need driven by the fact that almost 15% of the traffic that hits our servers comes from Safari. Some of our sites peak with a majority of their userbase on Safari – it’s the nature of their industry.
Update: Just to make sure I’m not being a total idiot I downloaded Scottgu’s “ToDo List” sample app from the ASP.NET AJAX site. It doesn’t crash in Safari, but it doesn’t actually do any AJAX either. There are no partial postbacks, and I can’t see any other evidence of the library actually adding value to the application when run in Safari. Now to start diff’ing and work out what magical setting Scott switched from the defaults to make it work.
Update 2: So, here’s the real compatibility guideline from my testing using a blank site, Scott’s sample and my big mumma’ of a commercial project… I’m hosting them on IIS7 with Vista RTM. All the Safari 2.0 tests are performed on Mac OS X, but as per the various Safari version compatibilities, the OS version ranges between 10.4.1 and 10.4.9.
- Safari 2.0 – Serve the uncompressed debug scripts (set ScriptMode=Debug on your Script Manager). The release mode scripts cause the parse error. You’ll get some bits working, but core things like the UpdatePanel will silently die – you just get full postbacks instead.
- Safari 2.0.1 – You’re dreaming. I couldn’t get anything to work.
- Safari 2.0.2 and 2.0.3 – Same as 2.0 for me.
- Safari 2.0.4 – Praise the lord – it works! It would even seem that you can run your scripts in release mode.
As per their documentation, Safari 1.x doesn’t work at all. (I tested Safari 1.3.2.) That’s fine – they said it didn’t work, so that’s the understanding I had when I chose to use the framework. Any Safair 1.3 issues are totally my responsibility.
In our normal development, we test both Safari 1.3 and Safari 2.0. There are major differences between the 1.x line and the 2.x line, so we found we needed to test in both. The Mac-based designers run the bleeding edge updates, but we keep the testing machines in their original un-updated state to replicate the large chunk of users out there who ignore Software Update.
Well, what are the outcomes from all this:
- The documentation is wrong and obviously untested. C’mon guys, I bought a couple of G4 towers off eBay for $80 each that I use via VNC to test this stuff. This information is listed in your technical documentation, not a wishy-washy marketing blurb, so be accurate and test it.
- I’m disappointed that Safari 2.0 through Safari 2.0.3 don’t work – there are lots of users still scatted across these different builds.
Unfortunately we’ve been having a really bad run with ASP.NET AJAX on our projects – issues in all the browsers, not just Safari – and I’m not keen to use it again any time soon. For now, we’re going to have to stick to one of the many other client side frameworks out there.
Over the last few days I’ve been talking to a number of the local guys about my opinions on MS in the client space at the moment. As per Neil’s suggestion, I’m going to write a post along the lines of “What I think needs to happen before I’m confident deploying ASP.NET AJAX or Silverlight”. I’m still a 100% Microsoft zealot when it comes to the server side components, but I’m temporarily losing confidence with their client-side abilities. I hope to have that confidence restored soon.
Update 4: Followed up at http://blog.tatham.oddie.com.au/2007/06/07/aspnet-ajax-continued/







I agree with you mate! This is one of a few areas of ASP.NET that have been horribly, horribly implemented and have not been given enough testing and love (one other part is the WebPart framework which pretty much only works as intended on IE 6+).
I’ve begun implementing an ASP.NET Ajax framework from the ground up, based on jQuery, for internal company use, but I may release it as an OSS project if enough people want a framework such as this.
Regards,
Thomas Johansen
Thomas Johansen
May 31, 2007 at 23:57
Can you send me an email (scottgu@microsoft.com) so that I can loop you in with someone to help?
Also – have you seen Chris’ post here of common causes for “Sys is undefined” errors: http://weblogs.asp.net/chrisri/archive/2007/02/02/demystifying-sys-is-undefined.aspx
Thanks,
Scott
ScottGu
June 1, 2007 at 02:10
“issues in all the browsers, not just Safari”: Can you please drop me e-mail with the details of those issues so that we can get a chance to fix them?
Bertrand Le Roy
June 1, 2007 at 08:01
[...] 7th, 2007 Last week I was angry. Today I’m [...]
ASP.NET AJAX … continued « Enter the Tatrix
June 7, 2007 at 16:23
I agree. Most web development is just that – Web development and will be open for public use. I developed an ASP.Net site using ASP.Net 2.0. And I am having a terrbile time adjusting it for Safari. Firefox is no problem (minimal tweeking). But it has become a nightmare for Safari. I know of several examples of MS instability already with VS 2008 already (not the beta, but the product to be released for marketing). As an example, if using an AJAX extension or toolkit control, the site gets errors because the controls are not referenced in the web.config as they were in VS 2005, so I have to copy code from a web.config in a VS 2005 project to get it to work. I really like VS 2005 and maybe 2008, but I certainly have a love/hate relationship with MS. With all of their resources, they should never release anything with bugs, but I find them to be the worst about this. E.I, Patch/Hotfix are constant, it is pathetic. I have been a devloper for twenty years and I have yet to have a bug in production. Why? Because of thorough testing!!! It is sad that my standard is higher than the biggest corporation in IT.
Ron
February 11, 2008 at 10:48
[...] of Safari don’t seem to be compatible with this and could cause many strange side effects as this person and I have experienced in the [...]
Calisto Mind » Blog Archive » Three quick ways optimize AJAX driven websites in ASP.NET
April 19, 2008 at 09:04