Tags: Configuration Optimizely CMS

Real-time Updates: A real-time connection could not be established with the server

If you are faced with the following error message when you log into Episerver Edit mode, do not fear. It can be easily fixed.

Real-time Updates A real-time connection could not be established with the server. This may be caused by incorrect configuration. Please see the User interface section in the user guide for further information.

Real-time Updates
A real-time connection could not be established with the server.
This may be caused by incorrect configuration.
Please see the User interface section in the user guide for further information.

The problem is that Episerver CMS tries to use web sockets, but fails. The preferred option is to enable web sockets on your hosting environment. If that is not possible, you can tell Episerver CMS to stop trying to use web sockets.

Enable websocket in IIS
The dialog for «Turn Windows features on or off» with the option «WebSocket Protocol» highlighted.

Enable web sockets in Azure

WebApp configuration in the Azure portal, showing how to enable web sockets.

Disable web sockets

If you, for some reason, cannot enable web sockets, or you use an CDN that prevents web sockets from working, add the following to your web.config file.

<appSettings>
   ...
   <add key="Epi.WebSockets.Enabled" value="false" />
   ...
</appSettings>

You can read more about web socket support in the CMS user interface in the developer guide.

Found this post helpful? Help keep this blog ad-free by buying me a coffee! ☕