You enable WebSockets in IIS when you host MDriven Turnkey and MDrivenServer on IIS, so the WebClient and server components can maintain the connections required to refresh application data.
Why WebSockets are required
WebSockets provide a persistent connection between the browser-based WebClient and MDriven services. In an IIS-hosted installation, enable WebSockets for both applications:
| Component | WebSocket communication | What you must do |
|---|---|---|
| MDriven Turnkey | The WebClient uses WebSockets toward the Turnkey Server. | Enable WebSockets for the IIS-hosted Turnkey application. |
| MDrivenServer | The Turnkey Server calls MDrivenServer through WebSockets to refresh its data. | Enable WebSockets for the IIS-hosted MDrivenServer application. |
For example, if your Turnkey site is hosted at https://server/MyTurnkey and MDrivenServer is hosted at https://server/MyTurnkey/__MDrivenServer, WebSockets must be enabled for both the Turnkey application and the __MDrivenServer application.
Enable WebSockets
- Install or enable the IIS WebSocket feature on the Windows Server that hosts the applications.
- In IIS Manager, verify that WebSockets are enabled for the MDriven Turnkey application.
- Verify that WebSockets are also enabled for the MDrivenServer application.
- Restart the affected IIS application or application pool after changing the IIS feature configuration.
- Open the Turnkey application and verify that it can communicate with MDrivenServer and refresh data.
If Turnkey and MDrivenServer are hosted as separate IIS sites, enable WebSockets for each site. If MDrivenServer is installed as the __MDrivenServer application under a Turnkey site, do not assume that enabling the setting only for the parent Turnkey application covers the MDrivenServer application; verify both applications.
Deploy in the correct context
WebSockets are one IIS prerequisite, not a replacement for the normal MDriven deployment configuration. Before testing, make sure that:
- The MDriven Turnkey and MDrivenServer applications are deployed and assigned to their intended IIS application pools. Core deployments use an application pool configured as No Managed Code. See Documentation:Deploying MDriven Server & Turnkey Core on IIS.
- The application-pool identity has the required folder permissions for each application. See HowTos:Installing MDriven Server on Windows.
- The IIS bindings and the URLs in the deployment configuration match.
- When you run Turnkey on premise, HTTPS is configured as required by the on-premise setup. See Documentation:Set up MDriven Turnkey on premise.
If communication or refresh does not work
Check the WebSocket requirement first on both applications. A configuration that enables WebSockets only for Turnkey can still leave Turnkey unable to use MDrivenServer for data refresh.
Then review the deployment configuration and logs for the affected application. Repeated IIS restarts are a separate problem; see Documentation:IIS application restart problem. Authentication configuration is also separate from WebSocket configuration; for Windows Authentication, use HowTos:MDrivenServer with Windows authentication.
