Products Technologies Demo Docs Blog Support Company

TXTextControl.Web: New Reconnect Feature

This article explains the new reconnect feature of the online document editor for ASP.NET, Angular and Node.js.

TXTextControl.Web: New Reconnect Feature

In version X18, we introduced a new feature that reconnects the WebSocket connection automatically in case it got disconnected. This happens in exceptional cases, but it is possible. For example, if the Internet connection randomly goes off for a short period of time.

In order to use one of the client-side TX Text Control document editors including MVC, Web Forms, Angular and Node.js, the following components are required:

  • A client-side library
  • Server-side WebSocketHandler (Node.js or ASP.NET on Linux or Windows)
  • Document synchronization TCP service (Windows)

The client-side component opens a constant WebSocket connection to the WebSocketHandler running within the WebSocketServer. When the connection is lost, TX Text Control is trying to reconnect to the same instance for a specific period of time.

If the connection is successfully re-established, unsaved changes are not lost and the complete document state is still available.

The following screen video shows this reconnection process. To simulate an interruption, the hosting Web Application is stopped. As soon as the application is restarted, the connection is established and the document is at the same state like before the disconnection.

The default time the editor is trying to reconnect is 30 seconds. After that, the connection is lost and the service instance is closed. This ReconnectTime can be adjusted in seconds in the settings as shown here for the MVC Html Helper:

@Html.TXTextControl().TextControl(settings => {
    settings.ReconnectTimeout = 20;
}).Render()

In case, the connection is lost, the webSocketClosed event is fired and informs about the reason. This event can be used to trigger an action like an UI update to inform users about the disconnection.

TXTextControl.addEventListener("webSocketClosed", function(e) { console.log(e) });

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Angular

Integrate document processing, editing, sharing, collaboration, creation, electronic signatures, and PDF generation into your Angular Web applications.

Learn more about Angular

Related Posts

AngularASP.NETJavaScript

Using the Document Editor in SPA Applications using the removeFromDom Method

This article shows how to use the removeFromDom method to remove the Document Editor from the DOM when it is no longer needed. This is useful when the Document Editor is used in a Single Page…


AngularASP.NETDocument Viewer

Merging Signature Annotations into Documents

The latest version of the TX Text Control Document Viewer can be used to sign any document with an annotation signature. This sample shows how to merge those SVG images into documents server-side.


AngularASP.NETDS Server

Version 30.0 Live Preview

Still in early beta, we published a live demo that shows some of the new features of TX Text Control 30.0 including comments and the new online document editor ribbon style.


AngularASP.NETDS Server

TX Text Control 30.0 Preview: Improved Online Document Editor Ribbon Design

We are currently working on version 30.0 that is planned to be released in Q4 2021. In this new version, the online document editor will receive an improved ribbon design and additional sidebars.…


AngularASP.NETCollaboration

DocumentViewer 29.2 (29.0.302.500) Final Released

We are happy to announce the final release of version 29.2 of the DocumentViewer for ASP.NET and ASP.NET Core. It comes with many new annotation and form field features to deploy documents for…