Getting ASP.Net 1.1 running on linux – a trap for Ubuntu 9.04 users
On 9.04 when you install mono from the repos by following these instructions, (and opt not to install ASP.Net 2.0 and just go with the default of 1.0) then you end up with a mis-configuration of the web server – it’s looking for the 2.0 version of the .Net framework when all you have is 1.0. This will be evidenced by these lines in /var/log/apache2/error.log
Cannot open assembly '/usr/lib/mono/2.0/mod-mono-server2.exe': No such file or directory.
It should be looking for ‘/usr/lib/mono/1.0/mod-mono-server.exe’. To correct this, you need to edit /usr/bin/mod-mono-server in vim or whatever and change where it says 2.0/mod-mono-server2.exe to be 1.0/mod-mono-server.exe.
At this point you will probably need to reboot your server – restarting apache throws up all kinds of horrible errors that make you think you’ve completely hosed apache. Before running screaming for your backup of /usr/bin/mod-mono-server just reboot and apache will start up fine.
I’ve just been through 2 hours of 20-tabs-open googling to nail this one, hopefully this post will save someone a similar experience 🙂