Installing mod_mono on Ubuntu: handler doesn't seem to get registered

Posted by Trevor Johns on Server Fault See other posts from Server Fault or by Trevor Johns
Published on 2010-03-04T22:57:28Z Indexed on 2010/04/06 18:43 UTC
Read the original article Hit count: 472

Filed under:
|
|
|
|

I'm trying to install mod_mono on Apache 2 (Prefork MPM). I'm using Ubuntu Karmic, and just want an auto-hosting setup (so that any .aspx files are executed, similar to how PHP is normally setup).

I did the following to install Mono:

$ apt-get install libapache2-mod-mono mono-apache-server2 mono-devel
$ a2dismod mod_mono
$ a2enmod mod_mono_auto

I've confirmed that mod_mono is getting loaded by Apache. However, any .aspx pages I try to load are returned unprocessed and still have an application/x-asp-net MIME type. It's as if the mod_mono handler never gets registered with Apache.

Here's the contents of /etc/mod_mono_auto.load:

    LoadModule mono_module /usr/lib/apache2/modules/mod_mono.so

And here's /etc/mod_mono_auto.conf:

MonoAutoApplication enabled
AddType application/x-asp-net .aspx
AddType application/x-asp-net .asmx
AddType application/x-asp-net .ashx
AddType application/x-asp-net .asax
AddType application/x-asp-net .ascx
AddType application/x-asp-net .soap
AddType application/x-asp-net .rem
AddType application/x-asp-net .axd
AddType application/x-asp-net .cs
AddType application/x-asp-net .config
AddType application/x-asp-net .dll
DirectoryIndex index.aspx
DirectoryIndex Default.aspx
DirectoryIndex default.aspx

I've even tried setting the handler explicitly:

AddHandler mono .aspx .ascx .asax .ashx .config .cs .asmx .asp

Nothing seems to help. Any ideas how to get this working?

© Server Fault or respective owner

Related posts about mono

Related posts about apache