ASP.NET on Linux? (Part 1)
Published: 15 Mar 2004
Unedited - Community Contributed
Many ASP.NET applications can run on Linux using technology provided by The Mono Project, an open-source development effort sponsored by Novell. The ability to run ASP.NET on Linux is important to Windows developers since low-cost hosting providers will see Mono as an inexpensive way to provide ASP.NET hosting to their customers. Since Mono also runs on Windows you do not need Linux to test your application for crossplatform compatability.
by William Wise
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 64613/ 125

Introducing The Mono Project

As the title of this article suggests, you are probably asking yourself “How can ASP.NET applications run on Linux?”  The answer comes in the form of a free software download from Ximian, a little known company that was recently acquired by networking giant Novell.  The Mono Project, as the software development effort is officially known, is primarily designed to allow Unix and Linux developers to compile and run .NET applications on their platform of choice.  However, if you’re not a Unix or Linux developer don’t turn the channel just yet! The odds are good that at least deploying ASP.NET applications on Linux may still be in your future because of the reduced costs associated with this combination.  Even if you have no personal interest in Linux or Mono’s cross-platform goals it’s still a good idea to be prepared to offer this low-cost option to your customers or management.


As you may be aware, most companies offering low-cost web hosting services provide their customers with access to a Linux box running Apache.  They also generally provide access to some form of open source database software (often MySQL or PostgreSQL) as well as access to a scripting language like PHP that is pretty much equivalent to classic ASP. While this combination can be employed effectively to build a variety of web-based applications, it’s impossible to deny that there are many benefits to using a more modern language architecture like ASP.NET.  Customers who want the best of both worlds—that is, the ability to deploy ASP.NET applications in a low-cost environment—will inevitably be drawn to the powerful combination of Linux and Mono to provide this capability.

Compatibility - The Good News

As we get into the nitty-gritty of our discussion of Mono’s compatibility with .NET be prepared for some good news and some not so good news.  As tradition dictates, we’ll look at the good news first.


Our first bit of good news is that if you want to use Mono to test your applications for compatibility but have little interest in establishing a Linux test environment then you’re in luck.  Mono provides a simple Windows executable that will install and configure your system for Mono development.  In fact, it’s important to note that Mono has no dependencies on .NET applications or class libraries so you don’t need to have .NET installed on Windows to develop .NET applications with Mono.  To download the latest Mono installer head on over to and grab the latest version. 


Mono currently supports ASP.NET deployment on Linux using either a small, light-weight web-server written in C# called XSP or via an add-on for Apache called mod_mono.  Whereas XSP is ideal for experimentation and development scenarios mod_mono is clearly the choice for deployments demanding greater performance and reliability.  Currently, Mono’s XSP web-server is not included as part of the Mono distribution.  Although downloading the C# source code for XSP is easy enough, actually building the source on Windows is a pain since Mono’s build system is very UNIX-centric in its reliance on “make” files.  Since most Windows users don’t have the tools required to compile “make” files I’ve posted the XSP executable at my web-site here.  What’s interesting to note is that although I built the XSP executable on Linux it runs just fine under Windows, which brings us to our next bit of good news…


Because Mono’s .NET compatible run-time (officially called the CLI, short for Common Language Infrastructure) is byte code compatible with Microsoft .NET binaries, you can (at least in theory) copy an existing .NET application from Windows to Linux and run it without recompilation.  Likewise, any application compiled using Mono’s C# compiler will also run without recompilation under Windows.  Of course, the truth of the matter is that, in either case, if you write your application using assemblies that are not available on the alternative platform you’re going to run into problems and therein lies the rub…

Compatibility - A Few Missing Pieces

Of the various .NET namespaces that often crop up during ASP.NET development most are very well supported considering Mono has not yet reached the 1.0 milestone.  The chart below (Figure 1) will give you a good idea of where Mono’s porting efforts currently stand in regard to several namespaces typically associated with ASP.NET development. If you want to keep tabs on the development of any particular namespace you should head over to Mono’s web-site and check out their Class Status Page at For a broad view of Mono’s release schedule take a look at their roadmap page at



Percent Complete









As the table above indicates, the ADO.NET namespace is about 90% complete. Moreover, Mono provides reasonably functional SQL Server drivers and work to improve them continues at a pretty fast clip. The biggest problem Windows developers are likely to face, however, is that any hosting company unwilling to spring for a Windows server license is not likely to provide you with access to Microsoft SQL Server either.  Instead, you will most likely be given access to either MySQL or PostgreSQL. The former, MySQL, is generally more popular in the Linux world because of its simplicity and reputation for fast SELECT queries which makes it ideal for serving dynamic web content.  PostgreSQL is no slouch either and has features which make it a much better match with SQL server from the standpoint of the developer but, alas, at the cost of additional complexity.


Now for that bit of bad news I mentioned.  Although Mono’s implementation of ASP.NET is fairly complete, one functional area closely related to ASP.NET is not very far along in development; namely, the System.EnterpriseServices namespace.  The EnterpriseServices namespace essentially wraps underlying Windows operating system services to provide support within .NET for transactions, message queuing, and other enterprise services.  The problem is that to implement these same services Mono will have to provide either native .NET implementations or wrap similar services that are available on the Linux platform.  In either case, compatibility will likely be an issue so you’ll probably want to avoid this namespace for some time to come. 


Since Mono is by definition attempting to reverse engineer and re-implement Microsoft’s released implementation and specifications it stands to reason that they will always be one step behind the latest Microsoft release.  In addition, given the differences between the Windows and Linux platforms it is quite likely that Mono will offer additional APIs to offer full coverage on their platform of choice.

Real World Mono

Now that you understand that Mono’s implementation of .NET is still a work-in-progress it’s important to reflect on how much has been accomplished by the talented programmers contributing to this effort.  A good example of the progress Mono has made toward providing a viable cross platform ASP.NET implementation is found in the fact that a number of Microsoft’s sample applications including IBuySpy work unmodified on Mono. As for performance, although Microsoft’s C# compiler generates more performant code is currently more performant than that produced by mono’s C# compiler the gap is closing rapidly. In addition, Mono’s support for Visual Basic.NET is shaping up quite nicely.


Even though Mono has yet to reach a 1.0 release at least one hosting provider,, has committed to providing low-cost ASP.NET hosting using Mono.  In the meantime, you can experiment with this interesting technology and even contribute to the project yourself if you are so inclined.  For more information on how you can help Mono develop into the powerful cross-platform development tool it may well become just click on this link:

Mono, Microsoft, and Software Patents

By submitting a large chunk of .NET’s technology architecture to ECMA, an international standards body, Microsoft clearly opened the door for compatible implementations to be devised. Unfortunately, the documents submitted by Microsoft failed to include many of the API’s provided by Microsoft with the .NET SDK.  As a result, in addition to the ECMA specifications, Mono also uses Microsoft’s published APIs as a guide to developing those namespaces that were not submitted to ECMA for standardization.


Regarding the issue of software patents, rather trying to explain Mono’s position on this issue I’ve included the relevant FAQ response from their web-site below:


FAQ Question 131:


Could patents be used to completely disable Mono (either submarine patents filed now, or changes made by Microsoft specifically to create patent problems)?




First some background information.


The .NET Framework is divided in two parts: the ECMA/ISO covered technologies and the other technologies developed on top of it like ADO.NET, ASP.NET and Windows.Forms.


Mono implements the ECMA/ISO covered parts, as well as being a project that aims to implement the higher level blocks like ASP.NET, ADO.NET and Windows.Forms.


The Mono project has gone beyond both of those components and has developed and integrated third party class libraries, the most important being: Debugging APIs, integration with the Gnome platform (Accessibility, Pango rendering, Gdk/Gtk, Glade, GnomeUI), Mozilla, OpenGL, extensive database support (Microsoft only supports a couple of providers out of the box, while Mono has support for 11 different providers), our POSIX integration libraries and finally the embedded API (used to add scripting to applications and host the CLI, or for example as an embedded runtime in Apache).


The core of the .NET Framework, and what has been patented by Microsoft falls under the ECMA/ISO submission. Jim Miller at Microsoft has made a statement on the patents covering ISO/ECMA, (he is one of the inventors listed in the patent): here.


Basically a grant is given to anyone who wants to implement those components for free and for any purpose.


The controversial elements are the ASP.NET, ADO.NET and Windows.Forms subsets. Those are convenient for people who need full compatibility with the Windows platform, but are not required for the open source Mono platform, nor integration with today's Mono's rich support of Linux.


The Mono strategy for dealing with these technologies is as follows: (1) work around the patent by using a different implementation technique that retains the API, but changes the mechanism; if that is not possible, we would (2) remove the pieces of code that were covered by those patents, and also (3) find prior art that would render the patent useless. Not providing a patented capability would weaken the interoperability, but it would still provide the free software / open source software community with good development tools, which is the primary reason for developing Mono.


The patents do not apply in countries where software patents are not allowed.


For Linux server and desktop development, we only need the ECMA components, and things that we have developed (like Gtk#) or Apache integration.

Next Time

Thus ends the first part of our coverage of Mono’s implementation of ASP.NET on both Linux and Windows.  Hopefully this article has helped you to understand what Mono is attempting to achieve, has brought you up to date on the project’s progress, and has made you aware of the challenges the project faces going forward.   


Next time we’ll get into some of the nitty-gritty details of running Mono on Windows and build a simple ASP.NET application using Mono’s command-line tools.  See you then!

User Comments

Title: Crime   
Name: Akhil Vijayan
Date: 2011-08-16 2:55:34 AM
Does Microsoft allow such a project as MOno. Isnt this project breach of intellectual property Rights. Any way Microsoft would not be pleased with people using in Linux.
Title: Excellent!   
Name: Mark Carson
Date: 2011-04-11 6:50:21 AM
There are hundreds of applications designed and developed for PHP and Apache. The majority of these are open-source and more importantly; 'useful'. Apache, MySQL and PHP can be installed and executed quite well on a Windows platform; free of licensing charges...
When this article was written, it was 'fantastic' to believe that the reverse was possible; .NET applications designed and developed for Windows could be installed and used on Linux technologies.
Even now, years on; this article provides some hope that .NET technologies can be fully supported on a 'low-cost' environment with the choices of database, file-system and web technologies that there should be...
Title: Dr   
Name: ASP
Date: 2011-03-07 7:17:49 AM
Sounds fantastic and would be grate to use with C#
Title: / MYSQL   
Name: Haneez Haroon
Date: 2011-02-02 1:03:15 PM
Most of the web hosting providers support now without MSSQL support.

Thanks for the information. Useful stuff.
Title: .net is run in linux   
Name: udit trivedi
Date: 2010-10-20 6:58:33 AM
it is possible or not i think that's possible because .net is software and is install in different environment
Title: Important Info   
Name: Seraju Rahman
Date: 2010-09-05 3:37:04 PM
It is nice information.But i am not 100% satisfied.
Give us clear Answer.?
Title: info   
Name: pankaj
Date: 2010-02-13 3:34:42 AM
can we run programes on linux servers?if yes,then which all facilities will not be available?
Title: Nice info   
Name: Aditya G. Jadhav
Date: 2009-12-23 2:05:37 AM

got nice information here but not enough. what about redhat linux, i mean there is no packages for RedHat as well as fedora is any migration. plzz give me solution if u so.

with warm regard
J. Aditya
Title: thanks   
Name: debanjan sengupta
Date: 2009-07-21 1:34:53 AM
i cannot install xsp on my fedora 9 system.i have already installed mono 2.4.2 and monodoc 2.0 but an error message is coming while installing xsp that "you need to install either mono 2.0 orc higher or .net sdk".what should i do?????
Title: Thank you   
Name: Okari
Date: 2009-05-31 2:43:22 PM
Thanks a lot... I'm a new graduate from university trying to set up a webserver for a small business, I studied mainly and started worrying cause the introductory classes clearly started that belongs to that other OS makers...

Thanks a lot
Title: What web server??   
Name: Anthony Estrada
Date: 2009-04-29 11:29:26 PM
What web server for i have develop ang application in mono but im wondering how could i implement it.
Title: Positioning of Mono   
Name: David Maeder
Date: 2009-04-23 3:49:05 AM
Excellent introduction to Mono, giving an independent warts and all view of this project.
Title: Game Dev   
Name: GasDeveloper
Date: 2009-03-03 2:15:10 PM
Does Mono have any support for 3D Graphic libraries, Or is it able to use any Libraries that support .NET. And can mono be used for GUI Applications?
Title: Mono   
Name: edcon
Date: 2008-08-06 2:58:59 PM
do you think mono supports Ajax, Silverlight and MS SQL database? Not sure if I'm asking a right question.
Title: Great Idea   
Name: metalisa
Date: 2008-07-24 9:00:16 AM
it will be a great feature to be able to run asp/net applications on linux
Title: Thanks   
Name: Jagadish
Date: 2008-07-14 11:24:24 AM
Thanks it is a good article.
Title: Crystal Reports on Ubuntu   
Name: Zahid Khan kakar
Date: 2008-06-13 6:54:23 AM
Please also tell me about Crystal reports with mono. Thanks
Title: Thakur   
Name: Pankaj Kr.
Date: 2008-05-19 8:25:42 AM
The article was of great interest to the developers like us who has the expertise of developing an application in .Net and wish to port the same across different platform.

Do continue to write similar articles but also test some .Net application on Mono. Because there is still some ????????s on the compatibility of the two.

Pankaj Kr. Thakur
Chief Executive
Renuka Associates Pvt. Ltd.
New Delhi, India.
Title: VB hosting on Linux (Ubuntu)   
Name: busnetdown
Date: 2008-05-13 10:06:47 AM
There is a good tutorial at about setting up your Ubuntu server to host applications. Also information about Vb pages.
Title: Nice   
Name: Marvin
Date: 2008-04-24 3:45:12 AM
Nice one on MONO . I just hope it will live up to its promises . I love open source and linux but in my job i use .Net so MONO is a great welcome.
Title: hi   
Name: pampa
Date: 2007-06-08 2:38:22 AM
Now that you understand that Mono’s implementation of .NET is still a work-in-progress it’s important to reflect on how much has been accomplished by the talented programmers contributing to this effort. A good example of the progress Mono has made toward providing a viable cross platform ASP.NET implementation is found in the fact that a number of Microsoft’s sample applications including IBuySpy work unmodified on Mono. As for performance, although Microsoft’s C# compiler generates more performant code is currently more performant than that produced by mono’s C# compiler the gap is closing rapidly. In addition, Mono’s support for Visual Basic.NET is shaping up quite nicely.
Title: Hosting providers   
Name: Eric Windisch
Date: 2007-03-24 6:24:32 PM
The provider that is listed there has gone out of business. However, there are other providers now. At least one of which has been in business for over 5 years...

For the latest list of providers supporting Mono:
Title: I loved this one   
Name: Rahul
Date: 2006-09-18 5:30:47 AM
praveen , I do not agree , There are so many indian companies that use dotnet may be willing to switch to *nix . Mono will be a blessing .
Title: how long will it survive   
Name: praveen
Date: 2006-08-27 11:53:46 PM
well, here in india, java runs in large, so i dont think so it wud survive in future with this new tech...!...?
Title: Really Nice information   
Name: Vijay Kumar Mateti
Date: 2006-07-20 11:45:34 AM
You really saved me. I'm a GNU supporter, I fell in love with linux but most of my work is on .NET platform so i'm forced to work on this environment. This article really cleared the clouds regarding implimentation of mono on linux. Expecting more Technical article on mono....
Title: MONO   
Name: Sarvesh Dhiman
Date: 2006-04-05 2:24:11 AM
The article about mono is too good. But is it possible to port ASP.Net application or windiw application on Unix platform using Mono. If it is possible then will it be great sucess then we possible to use COM Components on Unix Platform. and will run all aplication on linux
Title: Niks   
Name: Niks
Date: 2005-08-29 2:04:50 AM
The article is too cool. But is it possible to port ASP.Net application on Unix platform using Mono. If it is possible then will it be possible to use COM Components (Like Excel Workesheet, Excel Chart Objects, VB DLLs, etc.) on Unix Platform?

waiting for your reply. U can mail me at

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2022  |  Page Processed at 2022-08-15 6:25:18 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search