TX Text Control's HTML5 web editor is updated and synchronized with the server automatically using WebSockets. WebSockets is a protocol providing full-duplex communication channels using a single TCP connection.

Web.TextControl: Can't connect to the server?

If this connection is somehow failing or the handshake fails, you will see the below message:

Web.TextControl: Can't connect to the server?

This article shows possible reasons and ways to fix it.

  • No Internet connection

    TextControl.Web requires an active Internet connection. Make sure that the client-machine has full Internet connectivity.

  • Client browser doesn't support WebSockets

    All modern, HTML5-based browsers support WebSockets including Google Chrome, Firefox, Safari, Internet Explorer and Edge. You can test the compatibility on our HTML5 test page:

    Checking browser HTML5 capabilities

  • Firewalls: Deep packet inspection

    WebSockets uses port 80, the same port like normal HTTP traffic (browser). Port 80 is usually open on networks and is not blocked. Some older firewalls block WebSockets by checking the packets of port 80. In this case, adding SSL support (port 443) solves this problem.

  • Missing WebSocketHandler in web.config

    The WebSocketHandler is handling the incoming WebSocket traffic from the client (Javascript). This handler must be added to the web.config file which is done automatically when using the drag and drop functionality of the Visual Studio toolbox. Check your web.config for the following entries:

    <system.webServer>
    <handlers>
    <add name="TXWebSocketHandler" verb="*" path="TXWebSocketHandler.ashx" type="TXTextControl.Web.WebSocketHandler, TXTextControl.Web, Version=22.0.200.500, Culture=neutral, PublicKeyToken=6B83FE9A75CFB638" />
    <add name="TXPrintHandler" verb="*" path="TXPrintHandler.ashx" type="TXTextControl.Web.TXPrintHandler, TXTextControl.Web, Version=22.0.200.500, Culture=neutral, PublicKeyToken=6B83FE9A75CFB638" />
    </handlers>
    </system.webServer>
    view raw web.config.xml hosted with ❤ by GitHub
  • MVC: Set the WebSocketHandlerPath

    In ASP.NET MVC, the ASPX page including the editor can be in a different folder than the current view location. In this case, set the WebSocketHandlerPath property to the same folder like the ASPX page. If the ASPX page is located in the root folder, set the property to "\".

The F12 Developer Tools provide an elegant way to analyze your HTML code, your Javascript and CSS. But it also provides information about errors on the executed page. If you are seeing the above error, press F12 and check the console for errors:

Web.TextControl: Can't connect to the server?

If all of the above doesn't help, simply contact our support engineers. We will find the reason.