mojoPortal progress with .NET 2.0 and mono
Monday, December 26, 2005 1:28:25 PM
Rate this Content
0
0 Votes
Using the new preview of VS 2005 Web Projects which allows you to implement web projects in a way more similar to VS 2003, I was able to convert mojoPortal to VS 2005 and get it running on mono at http://demo2.mojoportal.com/
There were some errors running under mono but I managed to find workarounds for most of them.
The 2 biggest problems were
- System.NotImplemented exceptions when data binding a DropDownList or anything that inherits from ListControl. I worked around this by creating a helper function to add ListItems instead of calling the built in DataBind()
- System.NotImplemented exceptions anywhere a DataSet is used, it would break at System.Data.Common.DbDataAdapter:Fill. This is probably a big problem for a lot of projects but in mojoPortal I mostly use IDataReader so there were only a few places I was using DataSets and all I really needed was a DataTable so I created and populated one using an IDataReader instead of letting it come from a DataSet
I've commited the workarounds on the vs2005 branch of mojoportal for anyone who wants to play on the cutting edge.
To make mod_mono use the 2.0 stuff see my tutorial on Virtual Host configuration, especially the part about the MonoServerPath setting. Of course those working on Windows have surely discovered the new ASP.NET tab in IIS settings where you can choose either the 1.1 or 2.0 framework.
To get the code with TortoiseSVN:
svn+ssh://anonymous@forgesvn1.novell.com/svn/mojoportal/branches/vs2005
use anonymous for the password, you'll be prompted about 3 times on the first checkout. Its configured to use PostgreSQL, if you want to use a different db you'll have to drop the reference to the PostgreSQLData project in the Business class library and add a project reference to the data layer of your choice, MSSQLData or MySQLData.
Before you open it in VS 2005, make sure you have installed the new project type for VS from here: http://webproject.scottgu.com/
Configure IIS so that http://localhost/mojo2005 maps to the Web folder and build the solution
This is very encouraging progress! I'm not really using any of the new 2.0 features yet but getting it up and running on the 2.0 runtime is a major step in the right direction.
Copyright 2003-2010 Joe Audette