linux poison RSS
linux poison Email

How To Run ASP.NET applications (mono) on Ubuntu Linux - Ubuntu 10.10 (Maverick Meerkat)

Mono is a software platform designed to allow developers to easily create cross platform applications. It is an open source implementation of Microsoft's .Net Framework based on the ECMA standards for C# and the Common Language Runtime.

There are several components that make up Mono:
C# Compiler - The C# compiler is feature complete for compiling C# 1.0 and 2.0 (ECMA), and also contains many of the C# 3.0 features.

Mono Runtime - The runtime implements the ECMA Common Language Infrastructure (CLI). The runtime provides a Just-in-Time (JIT) compiler, an Ahead-of-Time compiler (AOT), a library loader, the garbage collector, a threading system and interoperability functionality.

Base Class Library - The Mono platform provides a comprehensive set of classes that provide a solid foundation to build applications on. These classes are compatible with Microsoft's .Net Framework classes.

Mono Class Library - Mono also provides many classes that go above and beyond the Base Class Library provided by Microsoft. These provide additional functionality that are useful, especially in building Linux applications. Some examples are classes for Gtk+, Zip files, LDAP, OpenGL, Cairo, POSIX, etc.

Installing Mono (ASP.NET 2.0):
Open up the terminal Application > Accessories > Terminal and type following command
sudo apt-get install mono-xsp2 mono-xsp2-base
sudo apt-get install asp.net2-examples
This will install the mono development environment along with some sample applications. To run the sample applications, go to the terminal and type the following command to start the web server ..
nikesh@poison:~$ xsp2 --root /usr/share/asp.net2-demos/
Listening on address:
Root directory: /usr/share/asp.net2-demos
Listening on port: 8080 (non-secure)
Hit Return to stop the server.
At this point, you’d want to navigate in your browser to http://localhost:8080/ and you should see a page similar to this:

NoteIf you already have an application written in .Net, you can scan your application with the Mono Migration Analyzer (MoMA) to determine if your application uses anything not supported by Mono.


Anonymous said...

That's great, thanks!

How do I get Framework 'Mono / .NET 4.0' installed on Ubuntu 10.10?

DevOps said...

Starting with Mono version 2.6 a new compiler dmcs is available as a preview of C# 4.0 (a preview since Mono 2.6 will ship before C# 4.0 is finalized).

The default compiler (mcs) now defaults to the 3.x language specification, starting with Mono 2.8 it will default to 4.0:

Please check the mono website for more details.

Anonymous said...

The mono website suggests I build from source. I've had many bad experiences with building mono from source and wonder if anyone is running recent mono on Ubuntu? suggests it might be a long, long time before Framework 'Mono / .NET 4.0' becomes available.

With Novel's self-lauded build system why does it take so long to make a recent mono available for Ubuntu?

Anonymous said...

I'm glad I kept looking because after this lovely step in the right direction I found Nathan Bridgewater's tools here and thought I haven't yet run monodevelop with .Net 4 on Ubuntu 10.10 it's looking good.

Rathan savvy said...

Thanks for the post, looking forward for many posts from you.

Alice Forsyth said...

I generally faces problems in Ubuntu for running applications because it all works on commands. I was looking for command to run ASP.NET through. I've found some other commands along with the commands which you provided. You solution helps me to clear my problem. Thanks!

Post a Comment

Related Posts with Thumbnails