Integration Guide
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
| Frontend | Choose it when | Read |
|---|---|---|
| ASP.NET Core MVC or Razor Pages | Your application renders its pages on the server with Razor views or Razor Pages | ASP.NET Core |
| Blazor | You build the user interface in C# and want to work with documents on the server | Blazor |
| Angular | Your application is an Angular single-page application | Angular |
| React | Your application is a React single-page application | React |
| JavaScript | Your pages use no framework, or another server technology renders them | JavaScript |
| ASP.NET MVC or Web Forms on the .NET Framework | You maintain an existing Windows application that doesn't run on ASP.NET Core yet | ASP.NET on .NET Framework |
Find the Right Page
| If you want to | Read |
|---|---|
Choose the packages, configure Program.cs for views, Razor Pages or separate frontends, protect the endpoints and use ServerTextControl in controllers and services | ASP.NET Core |
| Add both components to an Angular application with environment files, a development proxy, a document service and routes | Angular |
| Import the components in Vite, connect React projects to a shared backend and load, save and remove the components | React |
| Use both components in pages without a framework and create or remove them at run time | JavaScript |
| Set up the Blazor Document Viewer, program the editor in C# and preview merged templates | Blazor |
| Build HTTP endpoints that create, merge and convert documents for other applications | REST Services |
| Understand the WebSocket connection of the Document Editor and host it behind IIS, nginx or Azure App Service | WebSocket Architecture |
| Add the Document Editor, the Document Viewer or mail merge to an ASP.NET MVC or Web Forms application on the .NET Framework | ASP.NET on .NET Framework |
Where to Start
- ASP.NET Core: the backend that every frontend needs.
- The page of your frontend: Angular, React, JavaScript or Blazor.
- WebSocket Architecture: before you deploy the Document Editor behind servers, proxies or load balancers.
- 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.