[Mono-osx] Basic Mono Question

Grant Young gyoung at wwf.org.au
Tue Jun 28 19:33:48 EDT 2005

Hi Nik.

There doesn't seem to be a lot of activity on this list related to 
ASP.NET - most posts seem focussed on System.Window.Forms and Cocoa#.  
I'm not sure how many people on the list are working on ASP.NET on Mac 
OS X.  Perhaps they're all lurkers like you and me ;)

> 1. If I understand correctly, there was a problem with a web server 
> component of mono (was it mod_mono?)

Afaik, mod_mono still doesn't work on Mac OS X.  The lightweight XSP web 
server does now work (there were issues with earlier mono versions, but 
since 1.1.6 I haven't had any issues).  XSP is not really suitable as a 
live production server.

XSP also has some quirks that might affect your projects (for example, 
all media types are affected with forms authentication security, meaning 
that referenced external CSS, Javascript, and images etc. are not 
permitted to be viewed on login pages etc.  This is different to most 
server setups (such as IIS, Apache) where, unless you configure them 
otherwise, they will only apply forms authentication to the aspx pages.

> 2. I have a live web server, that is currently running on Windows 
> 2000. On it, I have a few sites written in C#. Most of the code is 
> compiled into dlls and user cotrols. They don't do anything amazing, 
> just regular dynamic fare. How big are my chances, that these sites 
> will function 1:1 on a Linux server running mono?

Theoretically dlls compiled on Windows should just work (and I have 
success with such).  One thing to be sure of though is using only 
release dlls (not debug) as I have heard reports of problems with debug 
dlls under mono.

I have run into various issues with running ASP.NET mono - some quite 
basic (like setting the DataSource property on a DropDownList control 
throwing a runtime exception) - some not so basic (HttpModules not being 
correctly applied and URL rewrites failing unless you use a specific 
overload).  Some of these issues have been fixed in later releases - the 
only way to know for sure is to test.

Also, I've had major problems getting charting components to work.  Some 
of the issues were related to unimplemented members in System.Drawing, 
others just hang with no exception to work from.  The specific 
components I've tried are ZedGraph 
(http://www.codeproject.com/csharp/ZedGraph.asp) and WebChart 

You will also run into issues with any code that references the file 
system - for obvious reasons (paths and the path delimiter will be 

Just a bit of warning too - if you use the MySql Connector .NET 
(http://dev.mysql.com/downloads/connector/net/1.0.html) - we've had some 
major issues with this as well (again these may have been fixed).  
Although this is not directly mono related, it is relevant as often mono 
is used in conjunction with MySql.  I've had most success with the, now 
deprecated, ByteFX.Data dll (which is bundled with Mono).

All that said - I have successfully built a basic web application that 
uses web controls, html controls, page inheritance, MySQL database 
access, XML parsing, HttpModules, and forms authentication.  The 
problems listed above, along with the lack of an IDE and visual 
debugger, did cause me headaches though.  And the charting component 
issues meant that I ultimately had to host on a win32 box (using code 
compiled in mono on mac os x).

If you use NAnt or NUnit tests you may also run into issues.

> 3. Is there a basic tutorial for installing Mono + whatever else it 
> takes to get going with asp.net on Mac OSX somewhere on the net?

I'm not aware of any step-by-step "getting ASP.NET on Mac OS X working" 
kind of tutorials.

Getting mono onto Mac OS X is literally as simple as using the installer 
on the Mono download pages.  You will have to compile XSP from source - 
the source is also on the downloads page.  This will require that you 
have the Mac OS developer tools installed.  There used to be a note on 
the wiki about installing XSP, but I can't seem to find it anymore.

> 4. Once mono is installed on Mac OSX, how can I compile dlls of .cs 
> code files?

Yes.  Theoretically.  As you have probably determined from the above 
your mileage may vary depending on the areas of the framework that you 

I would also recommend using NAnt to compile things as this takes a lot 
of the pain away.  There are very few IDEs that support Mono on Mac OS 
X, so NAnt is probably a must anyway.

HTH.  Grant

More information about the Mono-osx mailing list