How to Host Asp.net Application on Linux?

asp.net on linux

From the last posting I wrote about how to use connect mysql via asp.net technology. Because the web development makes everything possible, can we host asp.net applications on linux machine directly? The answer is yes, I would like to make a brief introduction about the general setup and check if it's good idea for production server deployment.

How to host asp.net website on linux server?

The answer is Mono. We can either add mod_mono for Apache web server or use the XSP webserver directly to serve asp.net pages. While Apache is the standard web server for linux, XSP is a "light-weight web server" capable of hosting and serving ASP.NET applications. The setup of XSP is little complex. To shorten the setup process and go with the standard, we highly recommend using apache. The detailed setup available on this apache mono setup page. If you would like to learn more details about the configuration, it's available on this codeproject article

Once you configured the module properly, you can put your asp.net codes to website working directory and it will out put the cool page as expected!

Why Hosting asp.net on linux server?

Just think about the price of windows server products and service fee for hosting. The possibility of hosting asp.net on linux is absolutely a big progress of web hosting industry. From professionals review, 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 clients. Because Mono also runs on windows we no longer need Linux to test our application for crossplatform compatability.

Is it suggested to host Asp.net site with Linux Hosting?

The mono project has been open for several years but not yet that perfect to serve any kind asp.net project, it's being developed to be fully compatible with windows technologies. However, unless you're doing local development, we never recommend to host your live .net site under linux hosting service. Simply because we can't make full use of the asp.net features as many objects/components are available from windows server only. The mono only be able to serve simple asp.net scripts that does not rely on windows components.

In case we need to introduce into some sophisticated configurations, we have to switch to windows for 100% compatibility. Generally speaking, we can only host some basic asp.net pages on linux server to approve the capability of linux hosting server.

How do we think about?

Because of the above weakness and limitations I think no much people would be interested to host their money-making website under such environment. But it's still a good sign for future low cost web hosting. Because of the development of such technologies we can spend less to put up our applications online. There's not an actual web hosting service with asp.net support on linux yet, but the tech development makes it possible in near future.