Saturday, March 3, 2007

Big news - MojoPortal 2.x runs on Mono!

As in the title - I've just managed to run MojoPortal 2.x (svn head) under Mono's ASP.NET 2.0 (also svn head) for the first time ever! As a proof, here's a screenshot:

Attempt to register the user succeeds, but later on the portal throws an exception about a missing attribute. I will look into it tomorrow and post any updates here. I'm really glad it has finally happened... :)

Joe, congratulations on excellent job with the portal!


Joe said...

Hi Marek,

Thank You! for all the great work you've been doing in Mono to make this possible.

I experienced this same success as I posted here previously.

Note that there is no menu on the page though. I had to comment out the menu binding to get it to show a page. There is some problem in binding to my custom SiteMapProvider. If you look in the Controls/SiteMenu.ascx.cs file in mojoPortal you will see this:
#if !MONO


It is leaving out that code when compiled in MonoDevelop. To see the error that happens when binding the menu remove the #if and rebuild in MonoDevelop, then run the web again.

The menu binding should be handled by the SiteMapDataSource control which lives in the master page. The master page used by default is at Data/Sites/1/skins/jwv1/layout.Master

Thanks So Much! for all the help you've been providing every step of the way. We are really getting there now.


marek said...

Hey Joe,

I read your blog entry, but I was so happy I could actually see MojoPortal on my browser, served by Mono that I couldn't help myself and had to blog :
I've just implemented a few missing features in Mono to make further progress. Will blog about them once I commit to the svn. More screenshots coming, I guess... :)

quark said...

Congratulations and salutations! :-) Oh, and Opera <3!

Ravi said...

That was a nice blog. Now i do want a favour from you.I would like to use Mono in conjunction with the Apache 2.0 Web server in order to use ASP.NET in Web pages.

I am a new developer in mono &

We want to develop an application which runs on Linux(Suse Linux).
I am in doubt about the development environment. As far i know Apache(Linux) with mod_mono will be the best method for us. but still can you give me some idea.

If i choose Visual Studio on Windows XP ( what web server and what method should i choose)
and what will be the environment for the Suse Linux machine?

To summarize what will be the development environment of application with mono?

I look forward to hearing from you.

marek said...

Apache 2.0 is a good deployment choice for ASP.NET apps with Mono. For development, though, it's enough if you use our standalone webserver called xsp (there are two versions - xsp for 1.x, and xsp2 for 2.0). It allows for quick local testing of your code.
You can use VS2003/2005 for development of your ASP.NET solutions and deploy them to any Linux-based OS without problems. Be warned, though, that we haven't released support for ASP.NET 2.0 yet - if you want to use VS2005, then you are advised to use the latest version of Mono (from svn trunk repository) since that version has the latest and greates we can offer regarding ASP.NET 2.0. Also, do not hesitate to report bugs you find with our ASP.NET 2.0 implementation - that way we can improve our code much more effectively.
If you do not care about visual design capabilities of VS2005, you can use MonoDevelop on Linux or SharpDevelop on Windows, or even Notepad if you want, for that matter :).
In general, the principle of .Net (realized to its full potential by Mono) is that no matter which platform you develop your code on, it will run on any other platform a .Net runtime implementation exists for. In other words - choose the best environment for you, one you feel most comfortable with (my personal choice, for example, is a Linux workstation with Emacs - that's what I used to code and create ASP.NET pages/controls).
Hope that helps a bit - if you have more questions, don't hesitate and ask them.