With the release of TX Text Control 33.0, we're introducing TXTextControl.Web.Server.Core - a major evolution in how the document editor works behind the scenes. This new backend is a lightweight, cross-platform .NET 8 application that replaces the previous Windows-only service, providing new levels of flexibility, scalability, and deployment freedom. Whether running on Windows, Linux, in containers, or in the cloud, developers can now seamlessly integrate Document Editor into modern infrastructures with improved performance and ease of use.
Learn More
With the release of TX Text Control 33.0, we are excited to introduce TXTextControl.Web.Server.Core, a major upgrade in the way the document editor works on the backend. This article provides an overview of the new architecture and how to deploy the backend on Linux using Docker.
The new Web Server introduces additional configuration options to give developers more control over their deployment setup. You can now define the TCP port the server listens on, allowing seamless integration into existing network environments or containerized infrastructures. In addition, the logging folder can be customized, making it easier to manage log files based on your organizational policies or infrastructure layout. These enhancements provide greater flexibility and make it even easier to tailor the server to your specific needs.
The JSON configuration file TXTextControl.Web.Server.Core.config.json that can be shipped with the web server contains the settings for the web server. To learn how to create a backend application and deploy the web server, read the article below.
Learn More
This article shows how to create a backend for the Document Editor and Viewer using ASP.NET Core. The backend can be hosted on Windows and Linux and can be used in Blazor, Angular, JavaScript, and ASP.NET Core applications.
Building an ASP.NET Core Backend (Linux and Windows) for the Document Editor and Viewer
Define the TCP Port
The TCP port that the web server listens on can be defined in the configuration file. The default port for version 33.0 is 4282. To change the port, add the following line to the configuration file:
{ | |
"Logging": { | |
"LogLevel": "Information", | |
"FolderPath": "./logs", | |
"FileName": "TXTextControl.Web.Server.Core.{date}.log" | |
}, | |
"TcpPort": 34567 | |
} |
In this example, the web server will listen on port 34567. Make sure that this port is open in your firewall settings in case the web server is running on a different machine than the client application.
If you actively change the port number, you must adjust the WebSocket middleware to connect to the web server on that port. This is done in your Program.cs file where the middleware is added. The following code shows how to set the port number, assuming the web server is deployed on the same machine (so localhost).
app.UseTXWebSocketMiddleware("localhost", 34567); |
If you have deployed the web server separately on another server or Azure App Services, you must specify the IP of that instance in this call.
app.UseTXWebSocketMiddleware("192.68.0.1", 34567); |
Define the Logging Folder
The logging folder can be defined in the configuration file as well. The default logging folder is ./logs. To change the logging folder, add the following line to the configuration file:
"FolderPath": "./my-logging-folder", |
You can also define the name of the log file. The default name is TXTextControl.Web.Server.Core.{date}.log.
Conclusion
With the introduction of TXTextControl.Web.Server.Core, we are excited to provide a more flexible and powerful backend for the Document Editor. The new configuration options allow developers to tailor their deployment to their specific needs, making it easier than ever to integrate TX Text Control into modern infrastructures. We look forward to seeing how you use these new features in your applications.