I like C#. Especially with the asynchronous syntax and the .NET Web API framework writing REST APIs is great. I also really like running Linux servers: open source, easy set up and administration, security, and of course price.
So I went on a journey to get my .NET REST API service running on CentOS. It turns out I took the really long route, so hopefully this post will save people some time. The main false assumption I made was that you had to recompile the application with Mono to use it in Linux; the same way you would recompile a C++ program for Linux.
I’ll skip the technical details and jump right to the conclusion: This is not true! All I had to do was compile in Visual Studio as usual, copy the binaries over and run the executable with mono:
And that is all there is to it! I love it when things like this happen.