Search code examples
c#iisowinkatanamod-mono

C# web application without IIS


For web application development using C#, IIS seems to be the standard choice of web server. But are there any other options? I want to use Linux for my web server.

As far as I can see the other options are:

  1. Make your web server program handle the IIS stuff yourself. (As long as you don't need a lot of IIS features, this won't be too expensive)

  2. Use XSP

  3. Use Apache Tomcat with mod_mono

  4. Use another web server like nginx or lighttpd (Is this even possible with C#?)

  5. Use that OWIN stuff (Are there implementations of this which are mature enough to consider yet?)

  6. Something else I haven't considered ... ?

Which of these options is the most viable for a web application in the long term?

I'm mostly concerned about the long term maintainability of the project, rather than the server being able to handle high volume loads.


Solution

  • Option 1

    1. Install Mono+XSP
    2. Launch ASP.NET web-app using XSP on different port e.g. 8001
    3. Proxy this port through nginx to 80

    Option 2 (Better)

    1. Wait for ASP.NET 5 (MVC6) release with complete Linux support
    2. Use standalone-application approach (OWIN-Like) on different port e.g. 8001
    3. Proxy this port through nginx to 80

    On both ways you will need to install Mono, and I recommend installing latest one, not the one that, for example, Ubuntu PPA gives.

    Also, since you are concerned about long-term you should really wait for Option 2 since it's going to be released in next couple of months.

    If you really cannot wait those months and do not want to work on beta-product and then migrate to stable only option I see is NancyFX which is web-app framework written in C# that has full Linux support now.