🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
Turn on websocket in IIS
This page was created by Hans.karlsen on 2021-01-19. Last edited by Wikiadmin on 2026-07-29.

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

  1. Install or enable the IIS WebSocket feature on the Windows Server that hosts the applications.
  2. In IIS Manager, verify that WebSockets are enabled for the MDriven Turnkey application.
  3. Verify that WebSockets are also enabled for the MDrivenServer application.
  4. Restart the affected IIS application or application pool after changing the IIS feature configuration.
  5. 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:

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.

See also