Mono came out with
complete support for ASP.NET 2.0 for the first time in history a couple of weeks ago. This means that for the first time in history we're able to build 100% FREE ASP.NET 2.0 software on a completely free stack from the bottom to the very top :)
After my initial blog about my
"race to linux" I've gotten a few questions about Mono, first to install Mono you need to do a couple of awkward steps unless you're on Fedora or SuSE. Probably the easiest way is to download the
Binary Mono Installer for x86 Linux versions. You could check out the
Mono install page to see if they've got a package for your system, but other then Windows, Mac OS X, SuSE and Fedora it's not very much. Nothing for us Ubuntu phreaks there... ;)
But it's really not that hard in fact, just download the .bin file and change it's properties to "executable" by browsing to it with e.g. Nautilus (Linux "Explorer") and choose the properties for it and go to the Permission tab sheet and hook in for "Allow executing file as a program". When you've done that you can (for Ubuntu) open up a Shell or Terminal and go to the directory for the file and type;
sudo .\mono-1.2.4_4-installer.bin and the installer will start. For those that just recently made the port to Ubuntu the FIRST word (sudo) is imperative since you want to run this program as
administrator. If you don't run it as an administrator you can only install it LOCALLY for the directories your (restricted) user account has WRITE access to. When you're executing this command you'll be asked for the admin password for your system, type this in and just follow the installer. It's kind of like a "normal Windows installer". Everything will just work :)
Now to the really important part!You've probably heard of
MonoDevelop which is an AWESOME tool for .Net development on Linux, but it's WAY FAR away from having "WebSite" ASP.NET 2.0 build support... :(
But Mono-Core to the rescue! :)
Running ASP.NET 2.0 apps on Mono
There's basically nothing else you need to do then to open up a shell, browse to the folder where your ASP.NET 2.0 WebSite is located and write in at the command prompt of your Shell (Terminal);
xsp2! :)
That's it! :)
Now you have a webserver running locally on port 8080 which you can browse to by opening FireFox or any other browser on your Linux system and typing in;
http://localhost:8080/Default.aspx and you're airborn! :)
The first time I did this with our Gaia Sample WebSite it was a true rush! Basically
everything just worked (almost) out of the box. The latest release of Mono is truly awesome and I urge you all to try it out, also within some few weeks our own
Ajax Library for ASP.NET 2.0 will come out with a 100% perfect build system for Linux. This means that not only can you "out of the box" RUN Gaia WebApps on Linux (which you can already) but you can also COMPILE Gaia itself on your linux box. Great things are happening...
PS!
If you haven't figured it out yet let me say this one more time;
You cannot COMPILE and RUN ASP.NET 2.0 applications using MonoDevelop since it doesn't have support for partial classes with ASP.NET 2.0. Basically what this means is that when you create a partial class which contains fields (data members) in the .aspx file it will generate compile errors. That's why the hack with typing in xsp2 at a Terminal is needed...
But by all means,
download MonoDevelop anyway, it's quite powerful and it is WAY more cool to use than GEdit or VI to edit your C# code files... ;)