Setting up Mono 2.8 with Asp.Net 4.0 and MVC2 on Ubuntu with MySql Membership

I’ve had a few requests to write a full walk-through installing Mono 2.8 w/ Asp.Net 4.0 since I posted an install script for Mono 2.8 on Ubuntu and Fedora.  So here it is! We’re going to be setting up a new server from scratch then installing just the basics of Mono 2.8 (Mono, GTK, GDI, XSP, & Mod_Mono). Then we’ll use that to setup a new Apache server with a basic Asp.Net 4.0 MVC2 application w/ MySql Membership.  That sounds like a lot, but it’s really very straight forward. So lets get started!

Update! 1/30/2011

Mono 2.8.2 has become available since this article was posted and is highly recommended due to security enhancments. Refer to install script for Mono 2.8.2 instead of 2.8. Pay close attention to your virtual host config so you use the correct mono install prefixes. Check MonoServerPath and MonoSetEnv directives below.

Setup Your Server

For our server, we’re going to setup a VM of 32 bit Ubuntu Server 10.04 LTS using VirtualBox. You can use whichever VM software you want or setup a physical server. This is just an easy sandbox system for this walkthrough. I noticed VirtualBox requires hardware virtualization for 64bit guest systems; keep that in mind if you test with a 64bit server.

I applied default configuration settings to my VM with 512 RAM and a bridged network interface so I could communicate with it directly from another machine. After that, I mounted the Ubuntu Server install ISO to the disc drive and booted it into installation.  During installation, the only package option I enabled was the OpenSSH Server (use arrows, spacebar, and tabs to move around the installer).  I’m not going to worry about other things like a web server since the Mono installer script will do that for us. Once you’ve completed the installer, unmount the ISO, boot up, and login. It defaults to using DHCP for ethernet, so find the current IP using:

ifconfig eth0

Using the IP Address listed here, connect to the box with an SSH client of your choice (I tend to use Putty or the OpenSSH client built into msysGit on Windows).  Immediately update your server. If you haven’t used “sudo” before, it will request your sudo password, which is just your normal account password you setup during install.

ssh nathan@ubuntu
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get upgrade -y


Install Mono

Once you’re updated, we can download the install script and install Mono, Apache, and dependencies.

wget --no-check-certificate 755

This will re-run another update and then download, compile, and install everything required to run Mono 2.8. It will also compile and install other Mono-related items like: GTK, GDIPlus, XSP, and Mod_mono. Once it completes, update your system path and reboot. Edit “/etc/environment” and insert “/opt/mono-2.8/bin:” to the beginning of the PATH value.

Once completed, refer to this more recent post about setting up MVC, which also includes information about setting up your environment for the new install. You can test it with “mono –V”.

nathan@ubuntu:~$ mono -V
Mono JIT compiler version 2.8 (tarball Mon Nov 15 14:39:28 CST 2010)
Copyright (C) 2002-2010 Novell, Inc and Contributors.
        TLS:           __thread
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  x86
        Disabled:      none
        Misc:          debugger softdebug
        LLVM:          supported, not enabled.
        GC:            Included Boehm (with typed GC and Parallel Mark)


So now we just need to configure Apache. The install process copied a mod_mono.conf to the directory: /etc/apache2.  You’ll need to enable this by moving it to /etc/apache2/mods-available and creating a link to that file at /etc/apache2/mods-enabled.

cd /etc/apache2
sudo mv mod_mono.conf mods-avail*
sudo ln -s /etc/apache2/mods-available/mod_mono.conf /etc/apache2/mods-enabled/mono.conf

#optionally restart apache server. more changes coming
sudo service apache2 restart


Configure Website

We’re using Mod_Mono to handle Asp.Net requests with Apache. I’ve mentioned before that I’m a big fan of the Mono website’s Mod_Mono configuration tool. We can use that tool to build our initial VirtualHost configuration. Then change the MonoServerPath to be the one we installed at: “/opt/mono-2.8/bin/mod-mono-server4”  When you’re done, upload (or move) this folder to your home directory on the server.

NOTE: We’re using mod-mono-server4 for Asp.Net 4.0 runtime. You can use mod-mono-server2 for 2.0-3.5 Asp.Net and mod-mono-server for 1.0-1.1 Asp.Net.

NOTE: If you’re unfamiliar with copying files from your Windows box to a Linux one, you can use FileZilla with an SSH (SFTP) connection. Connect to something like: “sftp://username@host” then treat it like any other FTP connection.

Here we’ll setup our web folders, permissions, move our configuration file, link it, and restart the web server. Our generated configuration file is named ubuntu.conf and was uploaded to my home folder.

sudo mkdir /srv/www
sudo mkdir /srv/www/ubuntu
sudo chown root:www-data /srv/www/ubuntu -R
sudo chmod 775 /srv/www/ubuntu -R
mv ~/ubuntu.conf /etc/apache2/sites-available
cd /etc/apache2/sites-en*
sudo ln -s ../sites-available/ubuntu.conf "000-ubuntu.conf"
sudo service apache2 restart

NOTE: I prefixed the link name with “000” since Apache loads configuration files in alphabetical order. It’s not necessary for this scenario, but if you’re running multiple virtual hosts and want a “default”, this is good to know. Make your default VirtualHost load first.

You might also want to give yourself permissions to write to the new web directories for publishing sites. The easy way to do this (maybe not best practice), would be to add yourself to the www-data group used by apache & mono, which we just setup with full access.

sudo usermod -a -G www-data your_username

Later when we upload the site, this will be a factor. The alternative will be to upload your published site to your home directory and then with an ssh console, sudo mv the published files to the web directories if you choose not to add yourself to the www-data group.

For this sample, we used all the default parameters in our configuration. Take note that debugging is enabled. I also left IO Mapping enabled to allow Mono to treat file system paths as case insensitive. You can improve performance by disabling IO Mapping. The VirtualHost configuration looks like this:

<VirtualHost *:80>
  ServerName ubuntu
  ServerAdmin web-admin@ubuntu
  DocumentRoot /srv/www/ubuntu
  # MonoServerPath can be changed to specify which version of ASP.NET is hosted
  # mod-mono-server1 = ASP.NET 1.1 / mod-mono-server2 = ASP.NET 2.0
  # For SUSE Linux Enterprise Mono Extension, uncomment the line below:
  # MonoServerPath ubuntu "/opt/novell/mono/bin/mod-mono-server2"
  # For Mono on openSUSE, uncomment the line below instead:
  MonoServerPath ubuntu "/opt/mono-2.8/bin/mod-mono-server4"

  # To obtain line numbers in stack traces you need to do two things:
  # 1) Enable Debug code generation in your page by using the Debug="true"
  #    page directive, or by setting <compilation debug="true" /> in the
  #    application's Web.config
  # 2) Uncomment the MonoDebug true directive below to enable mod_mono debugging
  MonoDebug ubuntu true

  # The MONO_IOMAP environment variable can be configured to provide platform abstraction
  # for file access in Linux.  Valid values for MONO_IOMAP are:
  #    case
  #    drive
  #    all
  # Uncomment the line below to alter file access behavior for the configured application
  MonoSetEnv ubuntu MONO_IOMAP=all;LD_LIBRARY_PATH=/opt/mono-2.8/lib:$LD_LIBRARY_PATH;PATH=/opt/mono-2.8/bin:$PATH
  # Additional environtment variables can be set for this server instance using
  # the MonoSetEnv directive.  MonoSetEnv takes a string of 'name=value' pairs
  # separated by semicolons.  For instance, to enable platform abstraction *and*
  # use Mono's old regular expression interpreter (which is slower, but has a
  # shorter setup time), uncomment the line below instead:
  # MonoSetEnv ubuntu MONO_IOMAP=all;MONO_OLD_RX=1

  MonoApplications ubuntu "/:/srv/www/ubuntu"
  <Location "/">
    Allow from all
    Order allow,deny
    MonoSetServerAlias ubuntu
    SetHandler mono
    SetOutputFilter DEFLATE
    SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip dont-vary
  <IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/javascript


Create and Publish Asp.Net MVC2 Application

In Visual Studio 2010, select the File menu –> New –> Project. In the new project dialog near the top center, select the .NET Framework 4.  Then on the left, select Web (under C#), and choose ASP.NET MVC2 Web Application.  There are a few key items we’ll need to remove to make this compatible with Mono.

First, open the ~/Models/AccountModels.cs file and remove all data annotations attributes from the three model classes’ properties. You may leave “DisplayName”. I’ve found (without investing a lot of time in this), that the data annotations doesn’t seem to work out of the box. Removing these attributes will allow it to run properly under Mono. Keep in mind, this also means, you’ll need to write your own server-side validation. It’s not too painful; we’ve been doing this for  years anyway.

Finally, build and test-run the site from visual studio. It should work fine with the built-in Casini test web server. If all is well, right click on the project (in solution explorer) and Publish the site. Publish it to the file system and choose a destination folder. You don’t need to include the App_Data folder, and you can delete all files before publish if you want.

Upload the published files to the server using FileZilla, and copy them to /srv/www/ubuntu.  Apache doesn’t need to be restarted when you update web files and assemblies. You should now be able to browse the site at http://your_test_server_host/.  All should work except membership since we haven’t configured the database yet.


Setup Membership with MySql

Awhile back, I wrote a post dedicated to MySql Membership with a simple config generation tool do this for you. Checkout the post for more details after setting up your database server. Setting up membership is identical between Asp.Net MVC and web forms. Install and configure MySql Server first. Then setup a placeholder database for the membership data. The first time you use membership during runtime will automatically generate the database schema.

Install MySql and Setup Empty Membership Database

sudo apt-get install mysql-server

NOTE: The default install will lock it down to localhost access only, which is good for a server. But for test, if you want to access it from your machine, you’ll have to tell it to bind to a LAN address (instead of Take a peek at /etc/msyql/my.cnf file to update this setting. The comments describe the change.

I’m giving application user full access (including schema change privileges) to the membership database. MySql Memebrship provider updates its own schema as you update the provider.  Checkout the MySql docs if you want to limit account privileges.

nathan@ubuntu:~$ mysql -h localhost -u root -p
mysql: create database membership;
mysql: grant all privileges on membership.* to 'aspnet_user'@'localhost' identified by 'secret_password';
mysql: quit

Configure Membership

I used my configuration tool and generated a simple membership config.  Copy the membership sections to your into the “system.web” section of your root web.config and setup a connection string with the same name as the one used in membership. (“Default” is used here).

Next, if you’re using a factory default version of MySql Connector/NET, you’ll need to download its source and recompile it with .NET 4.0 profile. I found while doing this that the published 2.0 version seemed to blow up when referencing transaction methods. I found that it was a known bug and should be resolved in upcoming versions of the connector. For now, you’ll need to recompile MySql.Web and MySql.Data with a 4.0 profile if you want it to work under Mono with membership.  The sample version packaged here has that done already.

NOTE: The version of MySql .NET Connector I was using at the time I wrote this tool (6.3.5) didn’t support hashed passwords with Mono runtime. I made a minor tweak to this version that will disable the Mono runtime check for hashed passwords and will allow it (since it does work in the current version of Mono). 

<authentication mode="Forms">

<membership defaultProvider="MySqlMembershipProvider">
        <add name="MySqlMembershipProvider"
              type="MySql.Web.Security.MySQLMembershipProvider, mysql.web"

<roleManager enabled="true" defaultProvider="MySqlRoleProvider">
        <clear />
        <add connectionStringName="Default"
            type="MySql.Web.Security.MySQLRoleProvider, mysql.web"

        <add type="MySql.Web.Security.MySqlProfileProvider, mysql.web"


Also for Mono, I added the DbProviderFactories section for MySql data in case it wasn’t already setup. Insert this adjacent to the <system.web> section.

        <add name="MySQL Data Provider"
            description="ADO.Net driver for MySQL"
            type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data"/>

Once updated, you should now be able to run the MVC app and register/authenticate user accounts. If you have any problems, double-check your data source value, username and password. Make sure you can connect to it with a mysql client and your app credentials.  Also I find the Asp.Net Configuration Tool built-in to Visual Studio helpful when testing Membership configuration. It will show you a number of users and roles if membership is configured properly.



Grab the sample from here or github. Includes: Web App, dependencies, & virtual host config. Comments, enhancements, pull requests, are welcome!



So now we’re done. The next thing you should checkout is how to use inversion of control with MVC2. I’ve been writing applications lately using SubSonic3 (repository mode) and Unity Application Block 2.0 for dependency injection. Coupled with MvcContrib test helpers and Rhino Mocks, this is a powerful combination for writing rock solid, testable applications that run on Windows AND Mono.

Here are a few useful links for this post:

35 thoughts on “Setting up Mono 2.8 with Asp.Net 4.0 and MVC2 on Ubuntu with MySql Membership

  1. @MrBronz

    That was a link to the github raw version of the file. Try this one (same thing). Also, I noticed the line feeds were missing from your comment. It’s possible you’re running all three commands at once.

    wget --no-check-certificate

    then do:
    chmod 755


  2. Thanks for that

    Confirmed that I have mono 2.8 installed

    Also followed your steps to Create a new project however, removing the data annotations attributes stops the project from compiling and running, but that another task for later.

    I used your example for creating the server eg ‘ubuntu’ but when I goto http://ubuntu, I get the site….

    Am I missing a localhost from my address? I have tried lots of combinations but still I cant get to the site.

    Any suggestions?

  3. Hi Nathan
    I tried to install using the fedora scripts on centos 5.4 machine. installation script did not report any errors but the file /opt/mono-2.8/bin/mod-mono-server* are not present. However mono -V works fine.
    I tried recompiling mod_mono expecting issues form it but no luck. Not sure whats wrong. Can you please help.
    Regards – sai

  4. Nevermind! figured out that I was having same issues as the one pointed by @rgb in the other thread

    - I have solved it by installing the latest sqllite by doing this.
    tar -xvf sqlite-amalgamation-3.6.10.tar.gz
    cd sqlite-amalgamation-3.6.10
    ./configure –prefix=/usr
    sudo make install

    - After this I re ran the installation. Everything went smoothly.

  5. Hi @Saiprasad

    It sounds like XSP did not install. Since the rest of Mono seemed to install okay, don’t re-run the full script. Just try manually compiling XSP alone and see if it shows any errors.

    cd xsp-2.8

    It should tell you if it’s missing any dependencies for XSP. You should be able to install them with the system packager or manually install them if the OS hasn’t packaged the right version. Once you resolve those and get XSP compiling successfully, install it with:

    sudo make install.

  6. A tip about compiling MySql Connector/Net 6.3.5 under GNU/Linux with Monodevelop 2.8.1: trying to build the MySql.Web project results in a compilation error about MembershipProvider not being found.

    To resolve this problem, you have to add a reference to System.Web.ApplicationServices, the assembly where MembershipProvider, RoleProvider etc. reside.

  7. Hello Nathan,

    I couldn’t make my own ASP.NET 3.5 MVC 2 project (made from VS 2008) work with my own compiled version of MySQL Connector/NET, so I tried your own project, and it works! Thank you: it saved me a lot of troubleshooting.

    However, I had to make some modifications in order to make it work in Monodevelop 2.4.1 and Mono 2.8.1 under GNU/Linux (Kubuntu 10.10).

    1. Remove the reference to “System.Web.Entity” in the SampleASP4MVC2.Web project.
    2. Remove the targetFramework=”4.0″ attribute from the Web.config.
    3. Replace “mysql.web” by “MySql.Web” in the “type” attributes of “add” tags in “membership”, “roleManager” and “profile” tags.

    However, if I register an account and try to log on later on, it doesn’t work. I get an error saying my password or username is incorrect.

    If I switch to clear passwords by putting passwordFormat=”clear” in the Membership provider configuration (web.config), and recreate my user, I can log on afterwords.

    It does seem like hashed passwords are not supported.

  8. @SylvainC
    Glad you got it working! Thanks for the helpful tips!

    Yeah, I had to make a few tweaks to this project. Mono supports hashed passwords in 2.8+, but the actual MySql connector itself has them disabled by throwing an exception if you try to use them. I disabled that check in this version of the connector.

    Also, if you download their source for the MySql connector, make sure the built assembly filne name case matches the reference you’re using. In my case, I think the assembly name in the project properties was all lowercase so the file name had to match; otherwise, Mono doesn’t like it.

    I haven’t tried to use it in MonoDevelop yet, but thanks for the heads up. I’ll check that out for sure.

  9. I got error .

    I use mysql membership. mvc 2 website on ubuntu 10.10 + mono 2.8.2 + mysql connector 6.3.6.
    my passwordformat is Clear.

    I use mvc default memberi view and controller.
    mono got error :

    The requested feature is not implemented.

    System.ComponentModel.DataAnnotations.DataTypeAttribute.IsValid (System.Object value)

    I checked mono class status page.

    it’s complete … why?!

  10. @Jerry
    Great! Glad you got that. I was going to say, to make the vanilla project work, you have to remove the data annotations from the account model classes. I hear it’s supposed to work, but I haven’t ironed out the details since I tend not to use the data annotations as much.

    Also, you can use encrypted or hashed passwords with Mono now, but you have to tweak the MySql.Web code a little so it ignores that it’s running on Mono. I recall doing that for this sample project.

  11. Thanks man!
    How can i automate the publish? Web deployment doesn’t seems to make the trick because websites deployed with web deployment tool don’t work with xsp

  12. @razvan

    That’s odd. What doesn’t work about it? Are you getting error messages?

    I’ve been using that for my deployments. It should work in both VS Express and full editions of 2008 and 2010. Make sure you set your web project references to “Copy Local” for System.Web.Mvc and System.Web.Routing. You may also need to define your data providers in the <> configuration section for whatever provider you’re using (mentioned in the post). Also, if you’re using Asp.Net 2.0 – 3.5, then configure your virtual host to use mod-mono-server2 instead of 4.

  13. Hi Nathan,

    I’m running the default mono install on Ubuntu 10.10, which is 2.6.7. I’ve got ASP.NET MVC working nicely. I have been able to use the MySqlMembershipProvider with passwordFormat=”Clear”

    When I use Encrypted passwords, I’m able to register a new user and see their user name show up at the top of the page. The password and password key are in the database, both encrypted. But when I go to log in again, it says the password is invalid.

    Creating another user with the same password, yields a new password and passwordKey in the database.

    I would assume some sort of salting is happening, but I thought that only happened with hashed passwords.

    Any ideas? If you could go into a bit more detail on your changes to the MySqlConnector, I can do the same for the .NET 2.0 version of the connector. I’ve downloaded the source for the 6.3.6 version.

    I was considering implementing my own Encryption in the MySqlConnector, but figured I’d try here first.

    Thanks for the great tutorials! They helped me setup ASP.NET MVC (Mono) @ using their cloud offering. Much cheaper than a hosted windows server in the cloud :)

    Thanks again,

    -Joe Barbere

  14. @Joe Barbere

    You bet! Well, that question might have somewhat of a complicated answer. :) But I might be able to lead you in the right direction. If you’re using encrypted passwords, try specifying the machinekeys manually. I wrote a tool for this here.

    The actual change I made to the MySql Membership Provider was just disabling the check they made for the Mono Runtime. They check for Mono and then disallow hashed passwords if Mono is detected. Mono 2.6 and newer support the hashing API used by the provider so the check isn’t necessary. Check the configuration initialization in the src\MySql.Web\Providers\Source\MembershipProvider.cs file.

    Good Luck!

  15. Thanks Nathan! I finally got it working. You were right, I just needed to remove the check in the Initialize method, and now hashed passwords are working. I tried using Encrypted passwords with my own encryption class, but it still generated a different encrypted password each time, the Encrypt method was called. I think there is something wrong with the algorithm, but I’m not versed enough in cryptography to figure it out.

    Now to just get ELMAH working with routing and I should have an awesome open source development platform!

    Ubuntu Linux – MySql – Apache2 – mod_mono – mono 2.6 – ASP.NET MVC 1- HTML5 – jQuery – log4net – Castle ActiveRecord – NHibernate – Elmah

    Hopefully I will be implementing LINQ, ASP.NET MVC 2, and NHibernate.Spatial in the next few weeks.

  16. @Joe Barbere
    Excellent!! Nice job! That’s so funny. I just ran into the exact same thing recently. I just got ELMAH working on mine. I actually recoded the ELMAH lib to work with System.Web.Abstractions too so I could use it for Rhino Mocks and testing. I started writing up a post on it, but my solution was unpredicable; would work sometimes and not others.

    You can try it out though.

    The main problem I had for Mono was getting the pages to render. I could get the root, but nothing else. Try enabling the IIS5 wildcard mapping like this: (Enable them in this order too).

    <add name="FixIIS5xWildcardMapping" type="Elmah.FixIIS5xWildcardMappingModule, Elmah"/>
    <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
    <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>

  17. Pingback: Anonymous
  18. root@iplist:~# wget –no-check-certificate 755
    –2011-09-02 16:28:03–
    Connecting to||:443… forbundet.
    HTTP forespørgsel sendt, afventer svar… 404 Not Found
    2011-09-02 16:28:04 FEJL 404: Not Found.

    –2011-09-02 16:28:04– http://755/
    Løser 755…
    Connecting to 755||:80… mislykkedes: Invalid argument.
    –2011-09-02 16:28:04–
    Løser…. mislykkedes: Name or service not known.
    wget: unable to resolve host address `’

    :( what to do?

  19. Hi.
    I have run the install script from the 2.10.5 version.
    And are trying to continuing on. But what is meant by

    “Once it completes, update your system path and reboot.”

    I cant exactly see what it is you want me to do. Can you please elaborate :p

    Thanks on advance.
    Kind regards

    And ty for the awesome install scripts.

  20. @drenriza ,
    My apologies. This post is a little old and was written before I realized a better way to work with environment settings for custom Mono installs. It’s now my preference to not disturb the native platform version of Mono and instead use a custom installation prefix like /opt/mono-2.8 or /opt/mono-2.10.5 to install these custom scripts. This way it won’t affect anything that the system packager uses for dependencies.

    I updated it with a link to another article I wrote about MVC that briefly covers setting up your environment settings either for an Apache virtual host or a command line environment to consume the new Mono install.

    Thanks! -Nathan

  21. Hi Nathan.
    A little confused. I looked at the new guide you posted to, and its not quite the same.
    So far i have installed the 2.10.5 script and edited my /etc/environment with the /opt/mono-2.8/bin:/ and tested with mono -V and i get the correct result. I was going to move on to

    “So now we just need to configure Apache. The install process copied a mod_mono.conf to the directory: /etc/apache2. You’ll need to enable this by moving it to /etc/apache2/mods-available and creating a link to that file at /etc/apache2/mods-enabled.”

    But now i should go back and follow reverting the /etc/environment back? Or should i just continue with the “old” guide? Which is “So now we just need to configure Apache.” What is the enhancement in the new vs the old way?

    Kind regards

  22. Sorry i write a lot. Hope you can delete some of my posts if it gets to much.
    I followed the guide on this page and configured apache to the guide above.

    But i wonder. What file do you edit to display below.

    ServerName ubuntu
    ServerAdmin web-admin@ubuntu
    DocumentRoot /srv/www/ubuntu
    # MonoServerPath can be changed to specify which version of ASP.NET is hosted
    # mod-mono-server1 = ASP.NET 1.1 / mod-mono-server2 = ASP.NET 2.0
    # For SUSE Linux Enterprise Mono Extension, uncomment the line below:
    # MonoServerPath ubuntu “/opt/novell/mono/bin/mod-mono-server2″
    # For Mono on openSUSE, uncomment the line below instead:
    MonoServerPath ubuntu “/opt/mono-2.8/bin/mod-mono-server4″

    I did not copy the whole text. Since i think you know what i refer to.

    My current issue is that i have published my project to my filesystem and moved the files to my server in /srv/www/ubuntu but the /var/www/index.html is what i see when i http://server_ip to my server. Think it has something to do with the last part i cannot locate.

  23. Hi @Patrick Herrington! Thanks!! Be sure and checkout the MVC3 post I did a little while ago following this post. It’s specific to Amazon, but the workflow is nearly the same.

    And, now with Ubuntu 12.04 released, it’s packaged with Mono; meaning MVC3 works out of the box without needing to setup Badgerports. – very nice!

  24. Hi @drenriza The issue you’re having is that your custom mono virtual host config (the apache config) is not enabled. And your default site is still enabled. Speaking to Apache only, you’ll be setting up a virtual host (in the example above) to listen to all traffic to that server. It will point to your new web directory and it will enable Mono for that virtual host. You also have to disable the default virtual host config (which points to /var/www). I just did a talk at KCDC ’12 about setting up Mono on Ubuntu 12.04. My recommendation now is to use 12.04 since most of things you need are built-in. And, use the Ubuntu commands for enable/disabling sites. (something I did not mention here).

    So quick answer.. run:

    sudo a2dissite default
    sudo a2ensite ubuntu.conf

    Assuming your custom config you generated from the mono site is named ubuntu.conf.

    Take a peek at my slides for the talk and see if they help at all. Also checkout some of the more recent posts like the Amazon Mono & MVC 3 install which go through these steps at detail for more current tech.

    Hope that helps!

  25. There is error of “Target Framework” as i am bulding the appliocation in .net framework 0.4 so i think it is not compatible for appache server 0.2. what is the solution fior this problem because i have to use .net frame work 0.4

  26. Hi,

    Could you explain please more details about the .webapp configuration file tags where we should use :
    -the real hostname (Server Name),
    -the web applciation name,
    -the physical directory used to define the virtual host,
    Because it seams to me realy confused …

    If any given link where I would find technical resources about mod_mono configuraiton, it would be very nice…

    Thanks in advance.

  27. Downloading mono packege


    tar: this is not tar file
    tar: skip next header
    tar: aborted….

    Why? Plese help me

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>