Live data from Hacker News

Running ASP.NET Web API Services under Linux and OS X

piotrwalat.net

1–10 of 17 posts

Re: Running ASP.NET Web API Services under Linux and OS X

#2
It's sounds cool and all but would you run this in a production environment? I am a ASP.NET developer by day and Linux fan at night, but there is no way I can convince anyone run ASP.NET applications on Linux.

I don't think you can reliably run ASP.NET applications on Linux. Or am I mistaken?

Re: Running ASP.NET Web API Services under Linux and OS X

#3
post #2

It's sounds cool and all but would you run this in a production environment? I am a ASP.NET developer by day and Linux fan at night, but there is no way I can convince anyone run ASP.NET applications on Linux. I don't think you can reliably run ASP.NET applications on Linux. Or am I mistaken?

I would say this is entirely dependent on your use case. If you are running some simple web services in a cloud environment, it is generally cheaper to run them on a Linux system. Granted, if you are developing in .NET, you have probably already forked over some heavy cash for the development tools (Visual Studio, the OS, ReSharper, etc...)

The key trade off is deciding if it is worth it to sacrifice compatibility with certain libraries for the development speed and costs of not having to learn an entirely new tech stack for yourself or your team.

As for running ASP.NET on Mono, I believe that both are mature and capable enough of running in a production environment. The mono website has a page listing various companies using Mono (some with ASP.NET): http://www.mono-project.com/Companies_Using_Mono

Re: Running ASP.NET Web API Services under Linux and OS X

#4
I just got our production server for our new mobile game setup on AWS EC2 running a similar setup- Ubuntu, Mono, and Nginx. I wanted to use C# server side so I could share code with the client (a game written in C# + Unity3d).

It was pretty easy to get up and running, even without running Visual Studio (I used Xamarin Studio (Monodevelop) for everything). I think it was a lot easier to get setup than this blog post makes it seem. I installed everything via apt-get and only touched 2 or 3 config files in total.

The most confusing thing for me was what kind of ASP.NET project to create. I've never done any .NET web development before so the differences between a "Web Application", "MVC 2" and "MVC 3" project were not clear.

I haven't done any load testing yet but I'm hoping it is stable and can handle all our meager load on a single EC2 instance. I'm also running DynamoDb and Redshift for a full AWS stack.

After finally wrapping my head around ASP.NET MVC I think it has a lot more of a learning curve than a Python/Django type web app (my only other serious exposure to web apps). The way Django does routing, URL variables, and responses seems a lot more intuitive.

Re: Running ASP.NET Web API Services under Linux and OS X

#5
post #2

It's sounds cool and all but would you run this in a production environment? I am a ASP.NET developer by day and Linux fan at night, but there is no way I can convince anyone run ASP.NET applications on Linux. I don't think you can reliably run ASP.NET applications on Linux. Or am I mistaken?

ServiceStack demos had been running on top of a Linux box for nearly one and a half year without a single reboot[1]. Much of the ASP.net stack had been opensourced by MS recently and the goodness had no doubt trickled down to mono. Of late, the mono framework has been concentrating more on mobile platforms than traditional desktop/server space.

[1] http://www.servicestack.net/mythz_blog/?p=838

Re: Running ASP.NET Web API Services under Linux and OS X

#6
post #3
post #2

It's sounds cool and all but would you run this in a production environment? I am a ASP.NET developer by day and Linux fan at night, but there is no way I can convince anyone run ASP.NET applications on Linux. I don't think you can reliably run ASP.NET applications on Linux. Or am I mistaken?

I would say this is entirely dependent on your use case. If you are running some simple web services in a cloud environment, it is generally cheaper to run them on a Linux system. Granted, if you are developing in .NET, you have probably already forked over some heavy cash for the development tools (Visual Studio, the OS, ReSharper, etc...) The key trade off is deciding if it is worth it to sacrifice compatibility wi…

If you are running some simple web services in a cloud environment, it is generally cheaper to run them on a Linux system

afaik there's not so much difference between a vps/virtual machine running Windows Server or Linux. I.e. for a cloud provider I'm using there's a difference of 5euro on a low level machine (30 euro) and same price for a more powerful machine (110euro for a 4 vcpu 8gb ram 50gb disk)

Re: Running ASP.NET Web API Services under Linux and OS X

#7

I just got our production server for our new mobile game setup on AWS EC2 running a similar setup- Ubuntu, Mono, and Nginx. I wanted to use C# server side so I could share code with the client (a game written in C# + Unity3d). It was pretty easy to get up and running, even without running Visual Studio (I used Xamarin Studio (Monodevelop) for everything). I think it was a lot easier to get setup than this blog post m…

Asp.Net Empty Web Application is the base project for an IIS hosted... asp.net app. It just contains the bare minimum web.config and project settings to get started. Though there are too many project references imho. All asp.net projects are based off this.

Asp.Net Web Forms Application is the original, and now derided, web framework. Consider it deprecated.

Asp.Net MVC Web Application is comparable to Rails / Django and the current version is 4.

The alternative to MS's MVC framework is FubuMVC [0] and is well respected.

Another alternative and is far more lightweight is NancyFX [1], .net's equivalent to ruby's sinatra [2].

[0] http://mvc.fubu-project.org/

[1] http://nancyfx.org/

[2] http://www.sinatrarb.com/

Re: Running ASP.NET Web API Services under Linux and OS X

#8

I just got our production server for our new mobile game setup on AWS EC2 running a similar setup- Ubuntu, Mono, and Nginx. I wanted to use C# server side so I could share code with the client (a game written in C# + Unity3d). It was pretty easy to get up and running, even without running Visual Studio (I used Xamarin Studio (Monodevelop) for everything). I think it was a lot easier to get setup than this blog post m…

Are you using default garbage collector, or switched to SGen? http://www.mono-project.com/Generational_GC

You may have memory usage problems http://stackoverflow.com/a/8766427/55209

Re: Running ASP.NET Web API Services under Linux and OS X

#9
post #6
post #3

Earlier quoted context omitted.

I would say this is entirely dependent on your use case. If you are running some simple web services in a cloud environment, it is generally cheaper to run them on a Linux system. Granted, if you are developing in .NET, you have probably already forked over some heavy cash for the development tools (Visual Studio, the OS, ReSharper, etc...) The key trade off is deciding if it is worth it to sacrifice compatibility wi…

If you are running some simple web services in a cloud environment, it is generally cheaper to run them on a Linux system afaik there's not so much difference between a vps/virtual machine running Windows Server or Linux. I.e. for a cloud provider I'm using there's a difference of 5euro on a low level machine (30 euro) and same price for a more powerful machine (110euro for a 4 vcpu 8gb ram 50gb disk)

Mind telling us what provider are you using? It's hard to find a Windows VPS provider at decent prices.

Re: Running ASP.NET Web API Services under Linux and OS X

#10

I just got our production server for our new mobile game setup on AWS EC2 running a similar setup- Ubuntu, Mono, and Nginx. I wanted to use C# server side so I could share code with the client (a game written in C# + Unity3d). It was pretty easy to get up and running, even without running Visual Studio (I used Xamarin Studio (Monodevelop) for everything). I think it was a lot easier to get setup than this blog post m…

Asp.Net Empty Web Application is the base project for an IIS hosted... asp.net app. It just contains the bare minimum web.config and project settings to get started. Though there are too many project references imho. All asp.net projects are based off this. Asp.Net Web Forms Application is the original, and now derided, web framework. Consider it deprecated. Asp.Net MVC Web Application is comparable to Rails / Django…

> Asp.Net Web Forms Application is the original, and now derided, web framework. Consider it deprecated.

I wish it was so in the enterprise world.

Post reply on HN