Setting up mod_mono (ASP.Net 2.0) on Ubuntu 7.10 (Gutsy Gibbon)

by tracker1 9. February 2008 17:57

After spending a day on this, I figured it would be worthwhile information for anyone that may be interested in configuring mod_mono2 (ASP.Net) for Ubuntu Gutsy.  I'm personally using an Ubuntu JeOS base configuration.  You may want to install your database of choice (mySQL, Firebird SQL, PostgreSQL, etc) in addition to other supported modules for apache2. 

First, you will want to install the necessary software...

sudo aptitude install apache2 mono mono-gmcs mono-utils mono-xsp2 monodoc-http libapache2-mod-mono mono-apache-server2

Second, you will want to use the auto configuration, instead of the default configuration, this will make your life easier.

     cd /etc/apache2/mods-enabled
    rm mod_mono*
    ln -s ../mods-available/mod_mono_auto.* ./ 

Next, you will need to set the config file to use mod_mono2 instead of the default mod_mono...

sudo nano mod_mono_auto.conf

Prepend the following line to the top of the file...

MonoServerPath "/usr/bin/mod-mono-server2"

You will need to restart apache after you have made this edit, in order to actually utilize mod_mono2.

sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start

Now all you need to do is have a ./bin directory and a web.config file in the root of any ASP.Net 2.0 web application.  It's also worth noting that you will not be using the most current version of mod_mono when you use Gutsy, and you may wish to look at one of the many source installation instructions out there.  Me, I just wanted something simple to be able to get up and going quickly, and acknowledge that I may not have the latest and greatest compatability. 

If you are having any issues make certain that you have Apache2 configured properly, and check /var/log/apache2/error.log for any error notifications.

Tags: , , , , , , ,

ASP.Net | mod_mono | mono | Ubuntu | Web Development

Comments

3/1/2008 6:46:21 AM #

Emery

The line
ln -s ../mods-availaibe/mod_mono_auto.* ./
is mistyped

It should be
ln -s ../mods-available/mod_mono_auto.* ./

Emery Sweden |

3/8/2008 8:04:58 PM #

tracker1

corrected, thanks.. Smile

tracker1 United States |

3/19/2008 3:53:56 AM #

Wilhelm

Great help. Finally a tutorial that works. Thanks

Wilhelm Germany |

7/18/2008 4:08:48 AM #

Andrea

I LOVE YOU... I LOVE YOU!!! I'm a guy, don't think bad... Wink

It works great!!! (I lost two days until I found this tutorial...)

It reads perfectly a .aspx page but not a .asp

is it normal? (I've got Gutsy)

what can I do in order to make .asp pages working as well?!?

thanks again for the simple and detailed tutorial!!!

cheers
Andrea

Andrea Italy |

7/21/2008 4:16:55 PM #

tracker1

ASP (Classic ASP) isn't well supported by FOSS, you can use Chilisoft's implementation, but that's commercial...

If you need classic, and .net versions of ASP, then the cheapest solution will be windows server (web edition)...   wish I had a better answer for you than that.

Rewriting your asp, to aspx may be a reasonable goal as well, if you rely on a lot of COM libraries, then that can be difficult.. good luck

tracker1 United States |

10/9/2008 12:26:21 PM #

Joel

Thanks man...I was searching for this like for days Smile

Joel Mexico |

Comments are closed

Powered by BlogEngine.NET 1.5.0.7

About the author...

Michael J. Ryan aka Tracker1

Michael J. Ryan aka tracker1 has been developing web based solutions since the mid 90s.  His interests include bbsing, communications and internet technology.  His resume and contact information is available at tracker1.info.