MDriven Turnkey Core lets you run a model-based MDriven Turnkey application on .NET Core; use this page to prepare the model and data, then choose the deployment guide for your hosting environment.
What MDriven Turnkey Core runs
MDriven Turnkey is the web application that presents your ViewModels to users. In a Turnkey Core installation, Turnkey connects to MDrivenServer, where you upload and run your MDriven model.
A typical installation has two applications:
| Application | Responsibility | Example |
|---|---|---|
| MDrivenServer | Hosts the model and provides the server-side model runtime. | You upload the model from MDriven Designer to MDrivenServer. |
| MDriven Turnkey Core | Connects to MDrivenServer and renders the application's ViewModels in the browser. | A user opens the site's Index ViewModel and works with the model through the Turnkey user interface. |
Prepare your model and prototype data
Before you deploy, save the model and any prototype data together.
- Place the XML file that contains your data in the same directory as the model.
- Name the data file according to the required
.PrototypeData.xmlconvention. - Keep the model and its associated prototype-data XML together when you copy, package, or publish the application.
For example, if you use prototype data while developing a model, do not leave its XML file in a separate local folder when preparing the deployment files. The model directory must also contain the corresponding file whose name follows the .PrototypeData.xml convention.
Configure a Turnkey Core installation
Turnkey Core requires configuration that remains outside the application package so that it can be preserved when the application is upgraded. Create the required files under the application's App_Data directory.
| File | Used by | Purpose |
|---|---|---|
App_Data/CommandLineOverride.xml
|
MDrivenServer and MDriven Turnkey Core | Provides the command-line argument configuration used when the application starts. When hosted by IIS, it includes the application's URL; that URL must match the IIS site binding. |
App_Data/MDrivenServerOverride.xml
|
MDriven Turnkey Core | Stores the URL and credentials that Turnkey uses to connect to MDrivenServer. |
App_Data/TurnkeySettingsOverride.xml
|
MDriven Turnkey Core | Stores Turnkey settings outside the application package so that upgrades do not overwrite them. |
Use the filenames exactly as shown. A spelling, extension, or casing difference can prevent the deployment from working.
Configuration example
If Turnkey is hosted as http://localhost:80, configure IIS with that same binding and ensure that the URL specified for the Turnkey application in CommandLineOverride.xml is also http://localhost:80. Configure MDrivenServerOverride.xml with the URL and credentials for the MDrivenServer installation that hosts the model.
Do not put Turnkey's MDrivenServer connection information only in files that are replaced by an application upgrade. Use App_Data/MDrivenServerOverride.xml.
Deploy on your platform
Choose the guide that matches where you host the applications:
- For Windows Server and IIS, follow Documentation:Deploying MDriven Server & Turnkey Core on IIS. It covers application pools, folder permissions, site bindings, the required override files, logs, and common IIS startup failures.
- For Microsoft Azure, follow HowTos:Install MDriven Server and Turnkey on Microsoft Azure. Azure deployments require WebSockets for communication between Turnkey and MDrivenServer.
- For Synology DSM, follow HowTos:MDriven on Synology.
After deployment, upload the model to MDrivenServer from MDriven Designer. Then open the Turnkey URL and verify that Turnkey can connect to MDrivenServer and display the application's entry ViewModel. Each Turnkey application must have an Index ViewModel.
Move an existing .NET Framework application
If you are moving an existing MDriven application from .NET Framework, start with Documentation:Migrating From MDriven .NET Framework to .NET Core. The migration process includes these key actions:
- Back up application data and user data before changing the deployment.
- Use the latest MDriven Designer for model projects and the latest MDriven Visual Studio extension for Visual Studio model projects.
- For Visual Studio projects, change the target framework to .NET Core and resolve compilation errors.
- Create the Core override files in
App_Datafor both MDrivenServer and Turnkey. - Restore application data after the new environment is ready.
If Turnkey is blocked from connecting after migration, the migration guidance identifies PwdReset as the way to set a new password for user a.
Troubleshooting checklist
When Turnkey Core does not start or cannot show the application, check the following in order:
- Confirm that both MDrivenServer and MDriven Turnkey Core are running.
- Confirm that
CommandLineOverride.xmlexists in each application'sApp_Datadirectory. - Confirm that the URL in each
CommandLineOverride.xmlmatches the applicable IIS binding. - Confirm that
MDrivenServerOverride.xmlexists in Turnkey'sApp_Datadirectory and points to the correct MDrivenServer URL with valid credentials. - Confirm that the application-pool identity has read and write access to the application folder when hosting on IIS.
- Check the MDrivenServer and Turnkey log directories and the Windows Event Viewer for startup errors.
For IIS-specific diagnosis, including HTTP 500.30 and AspNetCoreModuleV2 checks, use Documentation:Deploying MDriven Server & Turnkey Core on IIS.
Next steps
After the application is running, use Turnkey documentation for Turnkey concepts and workflows. To change the generated user interface, see Turnkey Styling. For guided examples of Turnkey development, see MDriven Turnkey Series.
