Posts in Category: Development

mojoPortal 2.0 Release files available

I just put up some release files compiled against the 2.0 .NET framework for those eager to play in the 2.0 space.

Unfortuantely I found another bug today in the mono 2.0 runtime that I haven't been able to work around and will probably have to wait for a bug fix in mono to get it working correctly. The site does run under mono using the 2.0 runtime as you can see at but when posting back updates on pages using a CheckBoxList like the Module Settings page and the Page Settings page, I'm seeing this error:

System.Exception: Unhandled Exception while processing NeatUpload child request ---> System.ArgumentOutOfRangeException: Index is less than 0 or more than or equal to the list count.
Parameter name: index
in <0x00096> System.Collections.ArrayList:get_Item (Int32 index)
in <0x00012> System.Web.UI.WebControls.ListItemCollection:get_Item (Int32 index)
in <0x0010f> System.Web.UI.WebControls.ListControl:LoadControlState (System.Object savedState)
in <0x00141> System.Web.UI.Page:LoadPageControlState (System.Object data)
in <0x0004d> System.Web.UI.Page:LoadPageViewState ()
in <0x0012f> System.Web.UI.Page:InternalProcessRequest ()
in <0x000aa> System.Web.UI.Page:ProcessRequest (System.Web.HttpContext context)--- End of inner exception stack trace ---

in <0x004a3> Brettle.Web.NeatUpload.UploadHttpModule:Application_BeginRequest (System.Object sender, System.EventArgs e)
in (wrapper delegate-invoke) System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)
in <0x0046f> System.Web.HttpApplication+<RunHooks>__0:MoveNext ()

I posted to the mono dev list and will follow up when I hear something but figured I would go ahead and make the files available to those who want them.

mojoPortal progress with .NET 2.0

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

It runs great on Windows, there are still some errors on mono if you click around in the administration section but that's major progress! Now I can start figuring out exactly what is broken and see if I can't get them fixed either by reporting bugs or maybe even trying to fix it in the mono sources myself.

I've committed the vs 2005 version of mojoportal source code to svn, you can get it here:

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 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:
Configure IIS so that http://localhost/mojo2005 maps to the Web folder and build the solution

Let me know how it goes.


Update 12/26/2005:
Managed to find workarounds for most of the issues running under mono using the vs2005 branch of mojoPortal. I haven't tested everything thoroughly but mostly it is working well now at
There is a problem with the Event Calendar but that problem also manifests under Windows so its not a mono bug but an ASP.NET 2.0 breaking change. Overall, this is very encouraging progress. There are some major issues still remaining in mono but I have found non-horrible workarounds for them at least for mojoPortal.
The 2 biggest problems were

  1. 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()
  2. 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 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

.NET 2.0 on Hold for mojoPortal

I've tried several tests now deploying mojoPortal compiled in VS 2005 on mono without success so I will have to wait to start developing in VS 2005 until it works. I'm getting a 500 error with no real details in the apache error log so I'm not sure how to proceed, other than to periodically update mono/xsp/mod_mono from svn and try again.

I'm also going to try creating some small test projects in VS 2005 and see if I can get any of them to work. For now work will proceed in VS 2003

If any of you have good luck getting a web project built in VS 2005 to work on mono please let me know any tips for making it work.

Update 11/17/2005
Miguel posted a good bit of information today about where things stand in the mono project including info about the progress on .NET 2.0 features. It sounds like Master Pages is already implemented and from other things I've read recently I get the impression that to use the 2.0 stuff that is there you have to run xsp2 instead of xsp which may account for why may test deployment built in VS 2005 didn't work on my mono test machine. I do plan to move forward in VS 2005 as soon as possible but there are a number of things that I need to work through and test before that can happen. For one thing I don't want a build of mojoPortal that I can't run at my hosting company so I will have to be sure I am happy with the way it works on my demo server before I can even begin thinking about trying to convince them to set things up for 2.0. I also want to be sure I can provide any configuration information needed so that it is easy for others to get things running on their mono servers. In short I think there will be at least one more release of mojoPortal for the 1.1 framework before we start making the move forward down the 2.0 path. There are a lot of good things to look forward to but also a lot of new things to learn.

mojoPortal compiled in Visual Studio 2005

I managed to convert a copy of mojoPortal to VS 2005 this evening without too much trouble. I had a few compile errors that were easily remedied then the Solution built fine and most importantly, the site works!

The next step is to test a deployment on mono and make sure things still work. I think they will since I'm really not using any of the ASP.NET 2.0 features yet. I know some of the 2.0 features are ready in mono so I expect I will tiptoe into changes to the new 2.0 way of doing things and test each change on mono as I go.

Then the next logical step is to tag the current VS 2003 code in svn and update the trunk to VS 2005. My timeline on this will depend on how the testing goes but I'm inclined to do it soon if things go well.

I invite comments from those of you actively working with the mojoPortal source code in VS.NET. Are you going to have access to VS 2005 anytime soon or will it cut you out of the loop if the main branch of development moves to VS 2005?

I'm excited about the 2.0 .NET stuff. There are definitely some major changes and new ways of doing things though it seems to support the old way fairly well so I think we can effectively pace our changes to coincide with mono support. I'm definitely not planning on doing anything that doesn't work under mono. It will be interesting to find out how much is already working.

LDAP Thrashing rescued by SLES 9

For about 3 weekends now I've been thrashing with getting OpenLDAP setup and working on my Suse 9.3 machine so I could test some work contributed by TJ Fontaine for supporting LDAP authentication. I read a lot of great tutorials but I always ran into some trouble. I did manage to get OpenLDAP running and was able to query it but I had problems getting the YaST and Samba integration working. I would run net getlocalsid and it would say it couldn't get either secret but I figured ok at least I can query it but I needed some users with the right schema elements especially a mail attribute. I was using the Samba shema which has a mail property but when I would try and set that using ldapmodify and a .ldif file it would give errors like that wasn't a valid attribute. I think the trouble had something to do with Samba being setup before I configured LDAP and then trying to change the Samba setup to use LDAP it got funky. I decided to try Edd Dumbill's tutorial on my laptop running the latest greatest Ubuntu breezy but it could not find all the needed packages to follow his instructions. I tried updating my sources.list file to see if some of the other repositories had the libraries but for some reason I could not connect reliably to any of the Ubuntu or Debian repositories. Not sure if this is just traffic problems due to the popularity of Ubuntu and the new release or what. I'm sure a linux super guru could have worked past these issues but for a long time Windows guy trying to learn as he goes its been quite a struggle with obstacles at every step. I do plan to give it another try soon with SUSE 10 for my own learning benefit but for now I just needed the shortest path to getting a working LDAP implementation so I can get back to working on mojoPortal.

Then it hit me (just like in the Novell ads ;D) maybe SLES 9 has an easier setup for LDAP, there must be some value added above and beyond what comes in the free version so I downloaded the 30 day eval version last night and installed it this morning. Sure enough you can configure LDAP as part of the install process. Unless I missed something this was not in the Suse 9.3 install. Anyway 30 minutes later I have a working LDAP server and 15 minutes after that I was able to login against it(in mojoPortal) using TJ's changes! Whoohoo!

Now I can get to the parts I need to do like implementing the other 2 data layers to support the new fields and creating upgrade scripts and other things to integrate TJ's changes. I have 30 days before my eval of SLES 9 runs out so I better get working! After that I need to test against Active Directory, in theory it should work the same way. TJ's implementation uses the Novell.Directory.Ldap library that comes with mono. I put this dll into the bin folder of my app on my Windows development machine and was able to compile against it and run under the .NET framework so it will work for mojoPortal installations under Windows or mono.