🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Set up MDriven Turnkey on premise
This page was created by Stephanie on 2023-06-15. Last edited by Wikiadmin on 2026-07-29.

You can host an MDriven Turnkey application and its MDriven Server on your own Windows IIS server when you need the complete development loop or production environment to remain on premises.

What you install

This setup places both applications under one IIS application:

Component IIS location Purpose
MDriven Turnkey The root application, for example /MyMDrivenTurnkeyApp1 Serves the Turnkey web application.
MDrivenServer A nested IIS application named __MDrivenServer, for example /MyMDrivenTurnkeyApp1/__MDrivenServer Stores and deploys models and provides the service used by Turnkey and MDriven Designer.

The __MDrivenServer name is required. It starts with two underscores.

Before you begin

Prepare the following:

  • A Windows server with IIS and permission to create applications and configure an application pool.
  • HTTPS for the IIS site. Configure a certificate that clients can trust, either a certificate you acquire or a self-signed certificate for an appropriate internal use case. HTTPS is required for the internal WCF communication used by MDriven Turnkey.
  • The current MDriven Turnkey and MDriven Server application packages from MDriven downloads. You need both packages.
  • An IIS application name. This guide uses MyMDrivenTurnkeyApp1 as an example; substitute your own application name consistently.

For the current IIS/Core deployment guidance, see Documentation:Deploying MDriven Server & Turnkey Core on IIS. This page describes the on-premises layout and the initial configuration that connects Turnkey, MDrivenServer, and MDriven Designer.

Create the IIS application layout

  1. In IIS, create a new application for MDriven Turnkey. In this example, the application URL is https://localhost/MyMDrivenTurnkeyApp1.
  2. Import the MDriven Turnkey application package into this root IIS application.
  3. Under that application, create or import a second IIS application named __MDrivenServer.
  4. Import the MDriven Server application package into __MDrivenServer.
  5. Confirm that __MDrivenServer is configured as an IIS application, not only as a directory.
  6. Configure HTTPS for the site and verify that the nested server URL resolves:

Grant MDrivenServer access to its log folder

MDrivenServer writes logs under __MDrivenServer/logs. Give the IIS application pool identity read and write permission to that folder.

  1. Locate the __MDrivenServer/logs folder in File Explorer.
  2. Identify the application pool used by the IIS application.
  3. Grant read/write access to IIS AppPool\NameOfTheAppPool, replacing NameOfTheAppPool with the actual pool name.

Without this access, the application may run with reduced logging or encounter file-access problems.

Initialize and secure MDrivenServer

  1. Browse to https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer/.
  2. On first access, MDrivenServer may report that its expected database is not present. It creates the database and performs its initial setup.
  3. Select Index to return to the default page.
  4. Register a user and retain its password. You need a user for MDrivenServer administration and an account that the Turnkey application can use to access MDrivenServer.
  5. Sign in to MDrivenServer with the registered user.
  6. In the administration area, select UserAdmin.

Restrict registration and service access

After you have confirmed that you can sign in with an administrator account, configure UserAdmin as follows:

  • Assign the users that must administer MDrivenServer to the SuperAdmin role.
  • Select Admin require Identification.
  • Select Services require identification.
  • Select Turn off registration.

These settings require identification for administration and services and prevent new self-registration. Record the credentials for every administrator before selecting Turn off registration; otherwise, you can lock yourself out.

Recover access if registration was disabled

If all usable administrator credentials are lost after registration is disabled:

  1. Locate __MDrivenServer\App_Data\DatabaseCompact.sdf.
  2. Open the database with SQL Server Compact tools.
  3. In the admin_GlobalSettings table, set TurnOffRegistration to 0 (false).
  4. Register a new user, sign in, and restore the required administration settings.

Connect Turnkey to MDrivenServer

When you browse to the root Turnkey application before it is configured, for example https://localhost/MyMDrivenTurnkeyApp1, it cannot connect because it does not yet know which MDrivenServer account to use.

Configure the required settings file:

  1. Open the Turnkey application's App_Data folder.
  2. Find TurnkeySettings - NotInEffect.xml.
  3. Copy the file and name the copy TurnkeySettings.xml. The file name must match exactly.
  4. Open TurnkeySettings.xml and enter the MDrivenServer user name and password that Turnkey will use.
  5. Restart the IIS application pool. Turnkey reads the settings file when the application starts.
  6. Browse again to the Turnkey root URL and confirm that it loads.

In a locally installed setup, this file is maintained manually. It is normally managed through the LicenseAndTicket website for sites that use that service.

Connect MDriven Designer for model deployment

Configure MDriven Designer to use the on-premises MDrivenServer rather than the first login page's default flow.

  1. Skip the first login page and open the second configuration page.
  2. Enter the MDrivenServer user name and password.
  3. Set the slot to A0.
  4. Select Automated Deploy. With this selected, an uploaded model is deployed automatically.
  5. Enter the MDrivenServer URL. For the example installation, use:
https://localhost/MyMDrivenTurnkeyApp1/__MDrivenServer

You can now upload and evolve models through the on-premises MDrivenServer. The Turnkey application uses the deployed model to serve the application. A Turnkey site requires an Index ViewModel; see Documentation:Set up new Turnkey site.

Update the installed binaries

To update MDriven Turnkey or MDrivenServer binaries, reapply the corresponding current application packages.

When importing an update, choose Append files. Do not choose an option that deletes existing files. Deleting files can remove the settings you created and the MDrivenServer database that contains models.

Preserve at least these installation-specific items during updates:

  • The Turnkey App_Data\TurnkeySettings.xml file.
  • The MDrivenServer database at __MDrivenServer\App_Data\DatabaseCompact.sdf.
  • Any required application data and configuration files.

Verify the installation

Use this checklist after initial configuration or an update:

See also