🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
Install MDriven Server and Turnkey on Windows (.NET Framework)

This guide installs the .NET Framework build of MDriven Server and MDriven Turnkey (download Windows .NET Framework) in IIS.

The .NET Framework build is still supported, but it is not the recommended path for new installations. For new installations use the .NET Core build. To move an existing installation, see Migrating from .NET Framework to .NET Core.

1. Install IIS and its features

Use a supported version of Windows Server or Windows 10/11 with .NET Framework 4.8.

  • On Windows Server, add the role Web Server (IIS) in Server Manager. On Windows 10/11, open Control Panel → Programs and Features → Turn Windows features on or off and add Internet Information Services.
Adding IIS in Windows features
  • Add ASP.NET 4.x (4.7 or later) and its components. ISAPI depends on ASP.NET 4.7 and may be skipped.
Features to activate
  • Under World Wide Web Services → Common HTTP Features, select Static Content if it is not selected.
  • Under Application Development, select WebSocket Protocol – see Turn on WebSockets in IIS.
  • If you use WCF (WebApi does not): under .NET Framework 4.x Features → WCF Services, select HTTP Activation and TCP Port Sharing. Without HTTP Activation you get Error 405 – Method not allowed instead of the MDriven login screen.
Add HTTP Activation and TCP Port Sharing

Also consider adding:

  • Logging Tools, Request Monitor and Tracing
  • Dynamic Content Compression and Application Initialization
  • Management Service and IIS Management Scripts and Tools
  • Basic Authentication, Windows Authentication or another authentication service

2. Install Web Deploy

The .NET Framework downloads are Web Deploy packages. Web Deploy adds Import Application to IIS Manager, which makes installation and updates simple.

  1. Install Microsoft Web Deploy.
  2. Make sure IIS Deployment Handler is installed (custom installation, or Change an existing installation).
  3. If the IIS Deployment Handler option is missing, turn on the IIS feature below and run Repair on Web Deploy.
Import Application in IIS Manager

3. Create the application pool

In IIS Manager, add an application pool with .NET CLR v4.0 and Integrated pipeline mode.

Add an application pool in IIS Manager
Create the application pool

Then select the pool, open Advanced Settings and set:

  • Start Mode: AlwaysRunning
  • Identity: the account that suits your environment (default: ApplicationPoolIdentity)
  • CPU → Limit Interval (minutes): 1
  • Disable Overlapped Recycle: True
Application pool settings

When you host several sites on one server, also see Memory optimization.

Folder permissions

The application runs as the application pool user when it accesses the disk. It uses %temp% to extract AssetsTK and CodeDress assemblies from the model, and needs access to the whole application folder to distribute CodeDress assemblies. The logs folder must allow Write and Modify. See AppPool user.

4. Add a certificate

MDriven Server calls itself, so the certificate must be valid for the address you use, and trusted on the server itself – otherwise the server cannot start. For a test, you can create a self-signed certificate in IIS Manager → Server Certificates, issued to the server's full machine name. See Certificates and HTTPS on IIS.

Server Certificates in IIS

On the site (for example Default Web Site), add an https binding on port 443 with the certificate.

Add bindings to the site

5. Install MDriven Turnkey and MDriven Server

The standard layout has Turnkey as the application and MDriven Server as an application called __MDrivenServer (two underscores) below it. Turnkey looks for its server at that address by default.

  1. Create an application with your app's name, for example MyTurnkeyApp, using the application pool from step 3. (To have the app at the site root, deploy Turnkey to the site itself instead.)
  2. Below it, create another application called __MDrivenServer, so that it becomes MyTurnkeyApp/__MDrivenServer.
  3. Use Import Application to install MDriven Turnkey into MyTurnkeyApp and MDriven Server into MyTurnkeyApp/__MDrivenServer, from the zips on the MDriven downloads page. If you created the applications first, leave the Application Path field empty so the structure is kept.
    • Updating: choose to overwrite, and do not remove existing files – the settings and MDriven Server's database in App_Data must stay.
Import MDriven Server

The result:

Application structure

6. Set up MDriven Server

Open MDriven Server in a browser:

https://<server name in the certificate>/<your application>/__MDrivenServer/

Use the name in the certificate (usually the full machine name with domain), not localhost.

  1. Register a new user for MDriven Server, for example admin (not a – that one is used by Turnkey).

  1. Log in and go to Admin area → Infos, errors and MDrivenServer evolve, and push Evolve Admin database.
  2. Turnkey uses a user account named a. Go to AutoForm, set databaseIdentity to admin, choose ASP_User → Show, open the user a with Details and rename it.
Setting up the "a" user
  1. Log out, and register the user a with your own password.

Then connect your data database (see Store the data in SQL Server), upload your model from MDriven Designer, and protect the server – see Set up MDriven Turnkey on premise for turning off registration and requiring identification.

Troubleshooting

Automating

The MDriven Installation Scripts are made for the .NET Core builds. For the .NET Framework build, see the older msdeploy approach.

Video

This video shows an installation of the .NET Framework build. It was made when MDriven Server still had the working name "Boring Predictable Server".

Setting up a Local MDrivenTurnkey application Creating site Installing the MDriven server software Pouring in information for IIS Checking MDriven server Adding a certificate Register a user Set up Turnkey Settings Uploading the Model Creating Index ViewModel ASPNETIdentity Snippets