TX Text Control .NET Server

Integration Guide

Topic

A first tutorial ends where most projects begin: in an application that already has its own frontend, controllers, services and users. The Integration Guide takes the Document Editor, the Document Viewer and document processing from Getting Started into such applications. It shows how each frontend connects to the ASP.NET Core backend, how documents travel between them and what hosting and security require.

Each page assumes that you know the first steps of its frontend from Getting Started and links to it.

How the Parts Fit Together

Every integration consists of the same parts, whatever the frontend:

Frontend: ASP.NET Core view, Blazor page, Angular, React or JavaScript
    |
    |-- Document Editor --- WebSocket ---> WebSocket middleware ---> editor backend process
    |-- Document Viewer --- HTTP --------> TextControl controller and engine
    |-- your code --------- HTTP --------> your controllers with ServerTextControl and MailMerge
    v
ASP.NET Core backend with TX Text Control .NET Server
  • The backend is an ASP.NET Core application. It hosts the WebSocket middleware and the backend process of the Document Editor, the controller of the Document Viewer and your own document endpoints.
  • The frontend decides where the backend lives. Views and Blazor pages run in the backend application itself. Angular, React and JavaScript frontends are separate applications that connect to the backend by URL.
  • Separate frontends need CORS for HTTP. The Document Viewer and your controllers answer requests from other origins only with a CORS policy; the WebSocket connection of the editor needs none.

Choose a Frontend

FrontendChoose it whenRead
ASP.NET Core MVC or Razor PagesYour application renders its pages on the server with Razor views or Razor PagesASP.NET Core
BlazorYou build the user interface in C# and want to work with documents on the serverBlazor
AngularYour application is an Angular single-page applicationAngular
ReactYour application is a React single-page applicationReact
JavaScriptYour pages use no framework, or another server technology renders themJavaScript
ASP.NET MVC or Web Forms on the .NET FrameworkYou maintain an existing Windows application that doesn't run on ASP.NET Core yetASP.NET on .NET Framework

Find the Right Page

If you want toRead
Choose the packages, configure Program.cs for views, Razor Pages or separate frontends, protect the endpoints and use ServerTextControl in controllers and servicesASP.NET Core
Add both components to an Angular application with environment files, a development proxy, a document service and routesAngular
Import the components in Vite, connect React projects to a shared backend and load, save and remove the componentsReact
Use both components in pages without a framework and create or remove them at run timeJavaScript
Set up the Blazor Document Viewer, program the editor in C# and preview merged templatesBlazor
Build HTTP endpoints that create, merge and convert documents for other applicationsREST Services
Understand the WebSocket connection of the Document Editor and host it behind IIS, nginx or Azure App ServiceWebSocket Architecture
Add the Document Editor, the Document Viewer or mail merge to an ASP.NET MVC or Web Forms application on the .NET FrameworkASP.NET on .NET Framework

Where to Start

  1. ASP.NET Core: the backend that every frontend needs.
  2. The page of your frontend: Angular, React, JavaScript or Blazor.
  3. WebSocket Architecture: before you deploy the Document Editor behind servers, proxies or load balancers.
  4. Deployment Guide: publish the application.

Applications on the .NET Framework don't follow this order: ASP.NET on .NET Framework covers ASP.NET MVC and Web Forms, which use the Classic engine and, for the Document Editor, the TX TextControl Service instead of the backend process of the ASP.NET Core packages.