Skip to content
A dotnet-core inspired self hosted web server framework for the mono runtime.
C# Lua JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

MonoServer - Web Backend Framework

MonoServer is a backend framework for developing server code in C#. It is architecturally inspired by for dotnet core. What makes MonoServer unique and useful is its deployment methodology, which is summed up as Put your compiled application on your server and run the program.

MonoServer applications are executable programs. They are self hosted and are started by running the executable and stopped by closing the process.

In The Works:

  • Docker Container and Digital Ocean images for running MonoServer applications using an Nginx reverse proxy.
  • Front end libraries deployed via nuget - project goal is to avoid dependency on npm / node.
  • Response.Write decorator pattern implementation.
  • Getting started wiki
  • Context interface segregation and System.Web independent implementation to facilitate testing


See the sample project at

The entry point for a MonoServer application is the Main method (!), found in Program.cs for the sample.

Core Concept

MonoServer serves requests by implementing a request pipeline. The pipeline starts with an HttpServer instance which passes requests to user defined IPipeLineComponent implementations.

This example pipes requests to a delegate that whitelists all requests and then serves files from the web directory on disk.

// Import the components from their packages
using MonoServer;
using MonoServer.Components.Delegate;
using MonoServer.Components.Files;

public class Program
    public static void Main()
        // create an HttpServer
        new HttpServer()
                        // Pipe requests to this delegate
                        // context is the object representing the web request
                        // next is the next IPipeLineComponent in the request pipeline
                        .UseDelegate((context, next) =>
                                context.Authenticated = true;
                        // After the delegate add a LocalFiles component
                        // Start the server on localhost at port 8080
                        .Start("localhost", 8080);
You can’t perform that action at this time.