TXTextControl.Web: New Reconnect Feature
This article explains the new reconnect feature of the online document editor for ASP.NET, Angular and Node.js.

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) });
Angular
Integrate document processing, editing, sharing, collaboration, creation, electronic signatures, and PDF generation into your Angular Web applications.
Related Posts
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…
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.
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.
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.…
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…