TX Text Control for Angular requires a backend for the document editor and viewer. This step-by-step walkthrough shows how to create the ASP.NET Core backend.


In order to create a backend application, TX Text Control .NET Server for ASP.NET must be installed on your machine. When deploying this backend application, refer to the documentation to learn how to install the required TCP Service:

Creating the Project

The following tutorial shows how to create an ASP.NET Core Web App that can be deployed to Windows machines.

  1. In Visual Studio 2022, create a new project, select ASP.NET Core Web App as the project template and continue with Next.

    Creating the application

  2. Select a project name, location and solution name in the next dialog and confirm with Create.

  3. In the last dialog, select .NET 6 (Long-term support) as the Framework and confirm with Create.

Adding NuGet Packages

  1. In the Solution Explorer, select your created project and choose Manage NuGet Packages... from the Project main menu.

    Select Text Control Offline Packages from the Package source drop-down.

    Install the latest versions of the following packages:

    • TXTextControl.TextControl.ASP.SDK
    • TXTextControl.Web
    • TXTextControl.Web.DocumentViewer

    ASP.NET Core Web Application

Adding the Middleware

  1. Open the Startup.cs file located in the project's root folder. Replace the complete class Startup with the following code:


Setting the Handler URLs

In your Angular project, change the webSocketURL attribute of the editor component in the app.component.html file to the URL of your backend application created above. Make sure that wss is used when the backend is hosted using Https and ws in case of Http.


For the DocumentViewer, set the basePath attribute to the URL: