🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Deploying MDriven Server & Turnkey Core on IIS
Created by Hans.karlsen on 2023-10-16 · Last edited by Stephanie on 2025-11-12.


Deploying MDriven Server and Turnkey on a Windows Server with IIS is a standard step for building a production-ready environment. While powerful, this crucial process can present challenges, from confusing IIS settings and application pool configurations to conflicts that arise when upgrading to newer .NET Core versions.

This guide is designed to cut through that complexity. We will provide a clear, step-by-step walkthrough covering everything from initial setup and prerequisites to correctly configuring the  CommandLineOverride.xml  file. By following these instructions, you can avoid common pitfalls and get your MDriven applications hosted on IIS successfully

1. Prerequisites & Environment Setup

Server Requirements:
  • Windows Server.
  • Administrative access to the server.
IIS Configuration:
  • Install ASP.NET Core Hosting Bundle using this Link Here.

For more information on installing .NET Core Apps on IIS, check out this article here

https://learn.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-8.0&tabs=visual-studio,

and more information in IIS Manager check this link

https://learn.microsoft.com/en-us/iis/get-started/getting-started-with-iis/getting-started-with-the-iis-manager-in-iis-7-and-iis-8

MDriven Downloads:
  • Visit the MDriven Website Downloads Page to download the latest version of MDriven Server and MDriven Turnkey for windows or use link here https://mdriven.net/App#/Downloads

2. Deploying MDriven Server in IIS

Step 1: Prepare for the Application
  • After downloading the MDriven Server Package for windows, Create a folder for the site (for example.,  C:\inetpub\wwwroot\MDrivenServer ).
Step 2: Create the IIS Site & Application Pool
  • Open IIS Manager.
  • Create a new Application Pool (e.g., "MDrivenServerAppPool") and set it to No Managed Code.
  • Create a new Website, pointing it to the folder from Step 1 and assigning it the new application pool.
Step3: Importing the Application
  • Unzip the MDriven Server package into this folder or use the IIS Manager import application feature to import the MDriven Server zip package; verify the files in the content of the zip to be extract and lastly specify the folder location (for example C:\inetpub\wwwroot\MDrivenServer ) where MDriven Server app files should be extracted to.
Step 4: Set Folder Permission
  • Modify the permissions on the Application folder created in Step 1 (C:\inetpub\wwwroot\MDrivenServer) to grant read and write access to app pool user for app pool created in Step 2 (IIS APPPOOL\MDrivenServerAppPool). For more details on app user permissions check the link Documentation:AppPool user.
Step 5: Bindings and Initial Testing
  • Configure site bindings (port, and optional hostname for example  localhost ).
Step6: Starting the Application
  • Make sure to Create the App_Data/CommandLineOverride.xml file in your Site folder (C:\inetpub\wwwroot\MDrivenServer) which contains parameters for pointing to and starting your application by IIS.
  • NOTE: Make sure that the Url used in the bindings in Step 5 for accessing your application should be that same used in this file

Contents of CommandLineOverride.xml file

<root>
 <arg>iis=http://localhost:80/MDrivenServer</arg>
</root>

where http://localhost:80/MDrivenServer is the Url to access the MDriven Server app

3. Deploying MDriven Turnkey in IIS

Step 1: Prepare for the Application
  • After downloading the MDriven Turnkey Package for windows, Create a folder for the site (for example.,  C:\inetpub\wwwroot\MDrivenTurnkey ).
Step 2: Create the IIS Site & Application Pool
  • Open IIS Manager.
  • Create a new Application Pool (e.g., "MDrivenTurnkeyAppPool") and set it to No Managed Code.
  • Create a new Website, pointing it to the folder from Step 1 and assigning it the new application pool.
Step3: Importing the Application
  • Unzip the MDriven Turnkey package into this folder or use the IIS Manager import application feature to import the MDriven Turnkey zip package; verify the files in the content of the zip to be extract and lastly specify the folder location (for example C:\inetpub\wwwroot\MDrivenTurnkey ) where MDriven Turnkey app files should be extracted to.
Step 4: Set Folder Permission
  • Modify the permissions on the Application folder created in Step 1 (C:\inetpub\wwwroot\MDrivenTurnkey) to grant read and write access to app pool user for app pool created in Step 2 (IIS APPPOOL\MDrivenTurnkeyAppPool). For more details on app user permissions check the link Documentation:AppPool user.
Step 5: Bindings and Initial Testing
  • Configure site bindings (port, and optional hostname for example  localhost ).
Step6: Starting the Application
  • Make sure to Create the App_Data/CommandLineOverride.xml file in your Site folder (C:\inetpub\wwwroot\MDrivenTurnkey) which contains parameters for pointing to and starting your application by IIS.
  • NOTE: Make sure that the Url used in the bindings in Step 5 for accessing your application should be that same used in this file

Contents of CommandLineOverride.xml file

<root>
 <arg>iis=http://localhost:80/</arg>
</root>

where http://localhost:80/MDrivenServer is the Url to access the MDriven Server app

Step7: Connecting to the MDriven Server

Make sure to Create the App_Data/MDrivenServerOverride.xml file in your Site folder (C:\inetpub\wwwroot\MDrivenTurnkey) which contains the Url and credentials for connecting to the MDriven Server.

Contents of MDrivenServerOverride.xml

<?xml version="1.0" encoding="utf-8"?>
<root>
  <MDrivenServerOverride MDrivenServerPWD="123456">http://localhost:80/MDrivenServer</MDrivenServerOverride>
</root>
Step8: Upload your Model

Upload your model to the MDriven Server using the MDriven Designer

4. Best Practices & Production Configuration

Application Pool
  • Create separate app pools for MDriven Server and MDriven Turnkey for better isolation

5. Troubleshooting Common Issues

HTTP Error 500.30 - ANCM In-Process Start Failure
  •   Solution:
    • Install/reinstall the correct bundle and restart IIS.
    • double check in IIS/Modules that AspNetCoreModuleV2 is listed, if not - the hosting bundle has not been installed.
    • make sure app pool has read and write access to app site folder. Give the app pool user full control to make sure there are no file access issues.
Database Connection Errors
  •   Solution:
    • Verify the connection string and check network connectivity.
Other Solutions
  • Run iisreset as admin
Where to Find Logs
  • Check Event Viewer (Application Log) and IIS log files for detailed error messages.
  • Check C:\inetpub\wwwroot\MDrivenServer\logs for MDriven Server logs and C:\inetpub\wwwroot\MDrivenTurnkey\logs for MDriven Turnkey logs.


Creating and deleting .net core sites using PowerShell

This powershell script automatically install and update an IIS website.

PowerShell script for IIS installation

Creating and deleting .net core sites using command line

Create app pool and site (parameter 1 is name of site and app-pool, parameter 2 is the site URL)

mkdir "C:\inetpub\%1"
%windir%\system32\inetsrv\appcmd add apppool /name:"%1" /managedRuntimeVersion:"" /managedPipelineMode:"Integrated"
%windir%\system32\inetsrv\appcmd add site /name:"%1" /physicalPath:"C:\inetpub\%1" /bindings:https/*:443:%2 
%windir%\system32\inetsrv\appcmd set app "%1/" /applicationPool:"%1"

Delete app pool and site

%windir%\system32\inetsrv\appcmd delete site "%1"
%windir%\system32\inetsrv\appcmd delete apppool "%1" 
rmdir "C:\inetpub\%1"