🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Install MDriven Server and Turnkey on Microsoft Azure
This page was created by Wikiadmin on 2026-07-29. Last edited by Wikiadmin on 2026-07-29.

You can host an MDriven Turnkey application and its MDrivenServer on Microsoft Azure App Service; this guide is for users who want to deploy the MDriven runtime to their own Azure account.

MDriven Turnkey is the web application that presents your modeled application to users. MDrivenServer stores and runs the model used by Turnkey. You can host them in two Azure App Services or place both in one App Service with MDrivenServer as a virtual application.

Before you start

You need:

  • An Azure account that can create an App Service and App Service Plan.
  • The current MDriven Turnkey and MDrivenServer packages from MDriven downloads. Download both packages.
  • Access to MDriven Portal if you use Portal for the first deployment.
  • A model with an Index ViewModel. Each Turnkey application must have an Index ViewModel; without one, Turnkey has no start view to show.

For an on-premises IIS installation instead of Azure, use HowTos:Installing MDriven Server on Windows.

Choose a hosting layout

Layout Azure App Services When to use it Result
Separate applications Two: one for Turnkey and one for MDrivenServer You want the two runtime applications isolated. Turnkey connects to the MDrivenServer application by its URL.
One application with a virtual application One You want both runtime applications under one Azure application domain. Turnkey runs at the application root and MDrivenServer runs at /__MDrivenServer/.

This page describes both layouts. If you use one App Service, complete the virtual-application configuration exactly as described in Host Turnkey and MDrivenServer in one App Service.

Create the Azure App Service

  1. Sign in to Azure Portal.
  2. Create a Web App for MDriven Turnkey. Enter the application name and create or select an existing App Service Plan.
  3. If you use the separate-applications layout, create a second Web App for MDrivenServer.
  4. Open each App Service and record its public domain. You need the MDrivenServer domain when configuring Turnkey.

For example, with the one-application layout, users open Turnkey at:

https://<your-azure-app-domain>/

MDrivenServer is then available at:

https://<your-azure-app-domain>/__MDrivenServer/

Enable WebSockets

WebSockets must be enabled for the Azure App Service. MDriven Turnkey and MDrivenServer require WebSockets to communicate correctly.

  1. In Azure Portal, open the App Service.
  2. Open the App Service configuration for WebSockets.
  3. Enable WebSockets and save the change.

When using two App Services, enable WebSockets for both applications.

Publish the application files

Azure supports several publishing methods, including Zip Deploy, OneDrive, GitHub, and FTP. Before choosing a publishing method, download the publish profile:

  1. In Azure Portal, open the App Service.
  2. On Overview, select Get publish profile.
  3. Save the publish profile securely. It is used to publish or register the site for deployment.

Publish Turnkey

  1. Download the latest MDriven Turnkey package from MDriven downloads.
  2. Publish the Turnkey application files to the Turnkey application's site\wwwroot directory.

Publish MDrivenServer

  1. Download the latest MDrivenServer package from MDriven downloads.
  2. With the separate-applications layout, publish the MDrivenServer files to the MDrivenServer application's site\wwwroot directory.

Host Turnkey and MDrivenServer in one App Service

Use this layout when one Azure App Service hosts both applications.

  1. Publish the MDriven Turnkey files to site\wwwroot.
  2. Publish the MDrivenServer files to site\wwwroot\__MDrivenServer.
  3. In Azure Portal, open the App Service and go to Settings > Configuration > Path mappings.
  4. Add a virtual application with these values:
Setting Value
Virtual path /__MDrivenServer
Physical path site\wwwroot\__MDrivenServer
  1. Set the virtual application type to Application.
  2. Do not select any of the checklist options for this virtual application.
  3. Save the path mapping configuration.

Turnkey remains the root application at site\wwwroot. MDrivenServer is the child application at /__MDrivenServer/.

Configure MDrivenServer

The MDrivenServer application needs IIS-specific startup configuration and an initial password reset.

Add the command-line override

  1. In the deployed MDrivenServer files, create App_Data/CommandLineOverride.xml.
  2. Set the file contents to specify the MDrivenServer location required by the .NET Core application under IIS.
  3. Publish the file with the application.

Set the password for user a

Turnkey uses the MDrivenServer user account named a.

  1. Create App_Data/PwdReset.txt in the MDrivenServer application.
  2. Put the new password in the file.
  3. Publish the update to Azure.
  4. Sign in to MDrivenServer using user name a and the new password.
  5. After you have verified the new password, delete PwdReset.txt and publish that deletion.

Do not leave PwdReset.txt deployed after testing. It contains the password-reset value.

Upload the model

After you can sign in with the new credentials, upload your model to MDrivenServer. The model must include an Index ViewModel before the Turnkey application can provide its start page.

Configure MDriven Turnkey

Configure the Turnkey application after MDrivenServer is available at its final URL.

Add the command-line override

  1. In the deployed Turnkey files, create App_Data/CommandLineOverride.xml.
  2. Set the file contents to specify the MDriven Turnkey location required by the .NET Core application under IIS.
  3. Publish the file with the application.

Set the MDrivenServer connection

  1. Create App_Data/MDrivenServerOverride.xml in the Turnkey application.
  2. Configure the file with the URL of the MDrivenServer application that Turnkey must use.
  3. Publish the file and restart the application if required by your deployment method.

For the one-App-Service layout, the MDrivenServer URL follows this form:

https://<your-azure-app-domain>/__MDrivenServer/

For separate applications, use the public URL of the MDrivenServer App Service.

Set Turnkey options

Create the Turnkey settings override file under App_Data and configure the Turnkey settings required by your application. After you have confirmed that Turnkey connects to MDrivenServer and the application is reachable, set debug information to False.

Recommended first deployment through MDriven Portal

For the first deployment, use MDriven Portal. This initializes the installation files and sets a strong password. After the initial setup, you can use another publishing method, such as OneDrive, to deploy updated Turnkey and MDrivenServer code.

  1. Open MDriven Portal and sign in.
  2. Go to Views > Show my Turnkey Sites.
  3. Select Register a New Site.
  4. Name the application, upload the Azure publish profile, select Create Turnkey Site, and then select Save.
  5. Return to Show my Turnkey Sites. Your site is registered but not yet deployed.
  6. Open the site and select Manage Turnkey Site.
  7. Select Request Deploy and save the request.
  8. Wait for the site status to become Deployed. Deployment takes no more than five minutes.
  9. Select Send Settings and Restart and save.
  10. Open the Azure application URL and verify that the Turnkey application is available.

Verify the deployment

Use this checklist after deployment:

  • Turnkey opens at the root application URL.
  • MDrivenServer opens at its own App Service URL, or at /__MDrivenServer/ when both applications share one App Service.
  • You can sign in to MDrivenServer as user a with the password you set.
  • Turnkey connects to the intended MDrivenServer URL.
  • WebSockets are enabled on every relevant Azure App Service.
  • The model is uploaded and includes an Index ViewModel.
  • Debug information is set to False after connection testing.

Database option

To use Azure SQL Server rather than the default SQLCompact database, follow HowTos:Use SqlServer with MDriven Turnkey. That procedure changes the model version connection type and explains how to recreate the database schema when the SQL Server database is empty.

See also