🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
How MDriven Core runs

This page explains how the .NET Core builds of MDriven Server and MDriven Turnkey run, on any platform. Knowing this makes the installation guides easier to follow and most startup problems easier to find.

Each application is its own program

The Core builds of MDriven Server and MDriven Turnkey are ASP.NET Core applications. The current builds run on .NET 10. All Core downloads – Windows, Linux, Linux Arm64, Linux MUSL, macOS x64 and macOS Arm64 – are self-contained: the .NET runtime is included in the zip, so you do not install .NET on the server.

Application Program (Windows) Program (Linux, macOS)
MDriven Server AppCompleteGenericCore.exe AppCompleteGenericCore
MDriven Turnkey StreaminAppCoreWebApp.exe StreaminAppCoreWebApp

On Linux and macOS, make the program executable after unzipping (chmod +x) and start it directly.

Each program contains its own web server, Kestrel, the web server built into ASP.NET Core. Kestrel listens on a port and serves the application. See Microsoft's description: Kestrel web server in ASP.NET Core.

In front of Kestrel: IIS, Nginx, Apache or nothing

In production, a web server usually sits in front of Kestrel and passes the requests on (a reverse proxy). It handles the public address, the certificate and the port 443 binding.

Platform In front of Kestrel How the application is started
Windows IIS with the ASP.NET Core Module IIS starts the program when the application pool starts, and forwards the requests to it (out-of-process hosting)
Linux Nginx or Apache A systemd service starts the program – see Install on Linux as services
macOS optional proxy A terminal or a launchd service – see native macOS
Docker Nginx container, or the host's web server The container starts the program – see Docker
Development machine nothing MDriven Designer starts both programs on local ports – see LocalServers

On Windows: IIS and the ASP.NET Core Module

  • The zips contain a web.config with an aspNetCore element. It tells IIS which program to start and that the application runs out-of-process: IIS starts the program and forwards the requests to its Kestrel server.
  • The connection between IIS and the program is the ASP.NET Core Module (AspNetCoreModuleV2). It is installed by the ASP.NET Core Hosting Bundle. That is why the Hosting Bundle is needed even though the builds bring their own .NET runtime. See Host ASP.NET Core on Windows with IIS.
  • The application pool is set to No Managed Code: IIS itself does not run any .NET code for the application.
  • Because the program runs as a separate process, its files (the .exe and .dll files in the application folder) are locked while it runs. Stop the application pool before you replace them with a new version.

Startup parameters: CommandLineOverride.xml

The Core applications read their startup parameters from App_Data/CommandLineOverride.xml (or from the command line). The most important parameters:

Parameter Meaning
iis=<address> The application runs behind IIS and has this address, e.g. iis=https://server/MDrivenServer. Usually the only parameter you need on IIS.
port=<number>, host=<name> Port and host name Kestrel listens on when the application runs without IIS, e.g. on Linux or locally.
nohttps Kestrel serves plain http. Used when a proxy in front of it handles https, and for local development.
pathtoapp=<path> The path the application has below the address, e.g. pathtoapp=/__MDrivenServer when MDriven Server sits below Turnkey.

More details and examples: CommandLineOverride.xml.

An MDriven Server calls itself. The address it is given must work from the server itself – including the certificate, if it is https. See Certificates and HTTPS on IIS.

How Turnkey finds its MDriven Server

  • By default, MDriven Turnkey looks for its MDriven Server at its own address followed by /__MDrivenServer. If MDriven Server is installed as an application called __MDrivenServer directly below the Turnkey application, nothing has to be configured.
  • Anywhere else – another application name, a separate site, another server – Turnkey needs App_Data/MDrivenServerOverride.xml with the server's address and password. See MDrivenServerOverride.
  • Turnkey writes the address it uses to its log when it starts: Started with MDrivenServerUrl: ….
  • Behind a load balancer or reverse proxy, an application can be told which public address it has with HardServerUrl.xml.

The settings and the local database live in App_Data

Each application keeps its settings in its App_Data folder. MDriven Server also keeps its own small database there (users, uploaded model, database settings). When MDriven Server starts for the first time, it creates this database from a start database included in the zip. Updating an application means replacing the program files; the contents of App_Data are kept.

See also