Friday, September 7, 2007

AJAX Control Toolkit on Mono

As some of you probably already know, thanks to great work by Mainsoft we can run Microsoft AJAX applications with Mono from svn trunk now. As long as the System.Web.Extensions namespace is almost complete, there were missing (or buggy) bits and pieces inside the System.Web assembly provided by Mono.
In the past two days I've been implementing the missing and fixing the buggy code to get the AJAX Control Toolkit running without modifications under Mono. Today it works nearly in 100%!
There are few things that don't work, but I'll leave it for later, since first I want to present a small screencast showing that the toolkit does run under Mono :)

The screenshot below shows that the toolkit is indeed ran under Mono's XSP (weak proof, but what's a blogpost without graphics, eh? :D):

The screencast below shows some of the demos in action (some demos don't work, see further down the page).

What doesn't work (and why):
  • AutoComplete. There's a problem with the remote service, haven't checked what is the problem yet.
  • Cascading DropDown. Another problem with the remote service, also not checked for details yet.
  • Filtered TextBox. The sample throws a weird parser exception, will take care of it soon.
  • HoverMenu. Throws errors about duplicate controls.
  • ListSearch. Throws a NullReference exception.
  • NumericUpDown. This one works in all cases except the one which uses a web service.
  • ReorderList. Depends on the existence of the TodoItems.xsd file which I had to remove (see below).
All the other samples work without problems. I'm going to take a look at the failing ones tomorrow and, hopefully, make them work.

There's one other issue you need to keep in mind if you want to test the toolkit on your Linux machine: the Mono's XSD generates invalid code from the TodoItems.xsd file that comes with the toolkit. To make the sample website work, you must generate the .cs file from the above .xsd with the .NET version of the tool:

xsd TodoItems.xsd /c

then put the result file in the SampleWebSite/App_Code directory and rename the TodoItems.xsd file to, for instance, TodoItems.xsd.orig

At this point you should be able to play with the demos.


Kevin said...

Thats awesome. Good work.

cvolny said...

neat, i'm going to have to test this out when i get back from break.

should work with mod_mono but we shall see ;-)

Anonymous said...

I saw the blog post and wanted to post a follow up question.

Currently, I am using VS 2008 and .net framework 3.5 and the ajax control toolkit for that version. I saw on the mono website that it is somewhere between framework 2.0 and 3.5. So I decided to develop against framework 2.0 in VS 2008 to be safe for Mono.

I am running into difficulties trying to compile the ajax control toolkit on my dev box (Windows XP) with the ajax control toolkit for version 2.0 (I am having conflicts with the system.web.extension namespace).

So the question is: would Mono support the ajax version 3.5 and the .net framework 3.5? That way I can forget about 2.0 and move on.