preload preload preload preload

Running ASP.NET applications on Ubuntu using Mono

What is Mono ?

Mono provides the necessary software to develop and run .NET client and server applications on Linux, Solaris, Mac OS X, Windows, and Unix. Sponsored by Novell (http://www.novell.com), the Mono open source project has an active and enthusiastic contributing community and is positioned to become the leading choice for development of Linux applications.

Introduction

The ASP.NET development environment on Ubuntu Linux is called XSP. This is a simple webserver written in C# that can be used for either ASP.NET 1.0 or 2.0 applications. You can install both environments side by side if need be.

Requirements

Monodevelop is probably the best IDE for developing .NET applications on Linux. In order to install and use it for development, you will also need the Mono .NET runtime environment installed. Thankfully, installing monodevelop and mono are very simple on Ubuntu.

Run this command from a Terminal window:

$ sudo apt-get install mono mono-gmcs mono-gac mono-utils monodevelop monodoc-browser monodevelop-nunit monodevelop-versioncontrol
ASP.NET 1.0

$ sudo apt-get install mono-xsp mono-xsp-base

$ sudo apt-get install asp.net-examples

This will install the development environment along with some sample applications. To run the sample applications, you will launch the XSP process and point it at the samples. You’d simply modify the path to run an application that you’ve created.

$ xsp –root /usr/share/asp.net-demos/

Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: /usr/share/asp.net-demos
Hit Return to stop the server.

ASP.NET 2.0

$ sudo apt-get install mono-xsp2 mono-xsp2-base

$ sudo apt-get install asp.net2-examples

This will install the development environment along with some sample applications. To run the sample applications, you will launch the XSP process and point it at the samples. You’d simply modify the path to run an application that you’ve created.

$ xsp2 –root /usr/share/asp.net2-demos/

Listening on port: 8080 (non-secure)
Listening on address: 0.0.0.0
Root directory: /usr/share/asp.net-demos
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:

image04.png

  • Share/Bookmark
  • 2 responses to "Running ASP.NET applications on Ubuntu using Mono"

  • Bipin
    17:46 on April 10th, 2008

    That is very nice to here.So you are telling that we can build the windows based .NET application in with Ubuntu OS???

  • admin
    17:55 on April 10th, 2008

    Yes we can build and host .net web applications in Linux loaded Systems like Ubuntu and other Linux flavours which support Mono.

  • Leave a Reply

    * Required
    ** Your Email is never shared