IIS (Internet Information Services) on Windows hosts MDriven Server and MDriven Turnkey applications for administrators who deploy MDriven applications on a Windows server.
Choose the IIS hosting model
Use the hosting configuration that matches the MDriven package you deploy.
| Package type | Application pool setting | Required runtime support | Example |
|---|---|---|---|
| MDriven Server on .NET Framework | .NET CLR Version v4.0 and Managed pipeline mode: Integrated | ASP.NET 4.5 or later; IIS features for ASP.NET | A legacy MDriven Server application deployed under C:\inetpub\wwwroot\MDrivenServer
|
| MDriven Server Core or Turnkey Core | No Managed Code | ASP.NET Core Hosting Bundle | A Turnkey Core site using application pool MDrivenTurnkeyAppPool
|
Keep MDriven Server and MDriven Turnkey in separate application pools in production. Separate pools isolate the processes and their settings.
Install IIS features
Install IIS before you deploy an application.
- On Windows 8 or Windows 10, open Control Panel > Programs and Features > Turn Windows features on or off, then enable Internet Information Services.
- On Windows Server 2012 R2 or Windows Server 2016, add the Web Server (IIS) role.
- Enable ASP.NET 4.5 or later and its required components for .NET Framework hosting.
- For Windows 10, enable World Wide Web Services > Common HTTP Features > Static Content if it is not already enabled.
- If the application uses WCF services, enable .NET Framework 4.7 Features > WCF Services > HTTP Activation and TCP Port Sharing.
HTTP Activation is required for WCF hosting. Without it, IIS can return Error 405 – Method Not Allowed instead of the MDriven login screen. Web API does not use these WCF features.
ISAPI depends on ASP.NET 4.7 and can be omitted when it is not needed.
Consider enabling these IIS features when they match your operational requirements:
- Logging Tools, Request Monitor, and Tracing for diagnosis.
- Dynamic Content Compression and Application Initialization for site operation.
- Management Service and IIS Management Scripts and Tools for administration.
- An authentication feature such as Basic Authentication or Windows Authentication.
For Core deployments, install the ASP.NET Core Hosting Bundle before you create the IIS site. See Documentation:Deploying MDriven Server & Turnkey Core on IIS.
Create a site and application pool
Create an IIS site that points to a dedicated application folder.
- Open IIS Manager.
- Create a folder for the application. For example, create
C:\inetpub\wwwroot\MDrivenServer. - Create an application pool. For example, name it
MDrivenServerAppPool. - Configure the pool according to the package type in Choose the IIS hosting model.
- Create a website, set its physical path to the application folder, and assign the new application pool.
- Configure the site binding with its port and, when applicable, host name. For example, bind the site to
localhostfor a local test.
For a .NET Framework MDriven Server application pool, open Advanced Settings and set the following values:
| Setting | Value |
|---|---|
| Start Mode | AlwaysRunning |
| Identity | Select an identity appropriate for your environment |
| Limit Interval | 1 |
| Disable Overlapped Recycle | 1 |
Set application folder permissions
Grant the application pool identity read and write access to the application folder. For example, for pool MDrivenServerAppPool, grant access to IIS APPPOOL\MDrivenServerAppPool on C:\inetpub\wwwroot\MDrivenServer.
The application runs as its application pool user when it accesses the disk. It needs access to %temp% to extract AssetsTK and CodeDress assemblies from the model file, and it needs access to the application folder to distribute CodeDress assemblies. See Documentation:AppPool user.
Deploy the application package
You can extract the MDriven Server or MDriven Turnkey package into the site folder, or import its ZIP package from IIS Manager.
To use IIS import:
- Install Microsoft Web Deploy.
- During installation, select IIS Deployment Handler. If the option is unavailable, enable its required IIS feature and run Repair on Web Deploy.
- In IIS Manager, use Import Application and select the MDriven ZIP package.
- Verify the ZIP contents to extract and select the site folder, such as
C:\inetpub\wwwroot\MDrivenServer.
Web Deploy adds the Import Application option, which supports application installation and updates.
Configure Core application URLs
For MDriven Server Core and Turnkey Core, create App_Data/CommandLineOverride.xml in the site folder. This file contains the parameters IIS uses to point to and start the application.
The URL configured in CommandLineOverride.xml must match the IIS site binding. For example, if IIS binds the site as http://localhost:80/MDrivenServer, configure that same URL in the override file. A mismatch prevents the application from starting correctly.
A Turnkey Core deployment also requires App_Data/MDrivenServerOverride.xml. It contains the MDriven Server URL and credentials that Turnkey uses to connect to MDriven Server. Upload the model to MDriven Server from MDriven Designer after the connection is configured.
Use Windows Authentication
Enable Windows Authentication in IIS when you want MDriven Server to authenticate users with Windows accounts instead of the default user name and password authentication. If the option is missing, add the Windows Authentication IIS role service.
After you start MDriven Server, browse to <yoursite>/AccessFromServer.aspx and select Use Windows Auth. This changes the web configuration to use the Windows authentication configuration files in App_Data.
If you require identification for administration or WCF services, add the application pool account to MDriven Server authorization. Assign the SuperAdmin role to the application pool user and to developers who control the executed model; assign AppUser to other users. See HowTos:MDrivenServer with Windows authentication.
Certificate requirement
Use a certificate that is valid for the MDriven Server URL. MDriven Server calls itself and must be able to accept its own certificate. An invalid certificate can stop MDriven Server from starting.
IIS Express for development
IIS Express is a small web server intended for development, not a production IIS replacement. MDriven Designer checks for IIS Express in C:\Program Files\IIS Express when you use its IIS check.
