Running ASP.Net on a Linux based server

For a developer with a Java background, I am interested in exploring software development using the ASP.NET tools/platform as well.

Java web applications (.jsp and servlets) can run on many server platforms.

Question : Will a .NET web application be able to run in a Linux based server? Considering the scenario of not being able to use a Windows server for hosting a web app.


It depends what specific .NET technologies you're using. The Mono Project provides an Apache module (mod_mono) for running ASP.NET sites, and from what I gather it works well.

Mono doesn't support all the .NET APIs, though - notably WPF (and possibly WCF too, I can't remember) - but it does provide good support for much else of the framework.

If you're starting from scratch and particularly want to target non-Windows servers, then ensuring your project works with Mono would be a good goal to aim for. However, if you need particular APIs or language features that are not supported by Mono, then you will need to use a Windows server for deployment. It's a design-time/architectural choice that should make up front.


So I know this is an older question but I think it could stand an updated answer.

Microsoft has officially released asp.net vnext and its open source and deploy-able to both Linux and Mac. Its all still pretty new but does rely on the latest builds of mono and thus currently needs you to compile the mono-framework but in time I suspect that it will be easier to access as various linux distros release updated versions of mono. This is a how to setup guide

This information may be somewhat volatile and with updates is due to change.

Update ASP.NET CORE 11/10/2017

  • asp.net vnext is now known as asp.net core.
  • asp.net core is being treated as a high priority in Microsoft due in part to its use with microservice architecture and docker and container technologies
  • It has become much more compatible with existing .net libraries due to .net standard 2.0.
  • It performs well when compared to other technology stacks such as go and node.js

  • You might want to consider this guide that helps Windows developers port their code to Mono/Linux:

    Guide: Porting ASP.NET Applications - Mono

    链接地址: http://www.djcxy.com/p/15936.html

    上一篇: Mono ASP.Net Web Service CacheDuration命中率,在Linux下

    下一篇: 在基于Linux的服务器上运行ASP.Net