# Native Library / Runtime Errors

> Fix startup errors of TX Text Control .NET Server: 32-bit processes, ARM64 and Alpine, Classic outside Windows, missing runtimes and Create returning false.

- **Product:** TX Text Control .NET Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET Server > Troubleshooting > Native Library / Runtime Errors
- **1615 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/native-libraries/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/native-libraries/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/native-libraries/llms-full.txt

---

TX Text Control is more than .NET assemblies: its engine consists of native libraries that must match the operating system and the processor architecture the application runs on. When they don't, or when a runtime they need is missing, the application fails as soon as the engine starts.

### What the Packages Contain

Each SDK package brings the native libraries of the platforms it supports in its *runtimes* folder: `TXTextControl.TextControl.Core.SDK` for `win-x64` and `linux-x64`, and `TXTextControl.TextControl.ASP.SDK` for `win-x64` and `win-x86`. [Package Overview](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/nuget/packages/llms-full.txt) describes the packages, and [Publish for the Target Runtime](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/ci-cd/#publish-for-the-target-runtime) how a runtime identifier selects the libraries that are published.

### The Application Runs as a 32-Bit Process

An application with the Document Editor ends during startup with this message; under IIS, the site answers with the error 500.30:

```text
The TX Text Control Web Server Core process requires a 64 bit environment. Please ensure that the application is running in a 64 bit environment.
```

The Core engine has native libraries for 64-bit processes only. The application runs as a 32-bit process, for example because it was published for `win-x86`, because the IIS application pool has **Enable 32-Bit Applications** set to **True**, or because Azure App Service runs the application in a 32-bit worker process.

1. Publish for a 64-bit runtime:

    ```bash
    dotnet publish -c Release -r win-x64 --self-contained false
    ```

    In the Visual Studio publish profile, set **Target runtime** to **win-x64** or **linux-x64**.
2. Run the application in a 64-bit process of the host: see [The Site Answers With Error 500.30](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/iis/#the-site-answers-with-error-500-30) for IIS and [The Application Doesn't Start on Windows](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/azure/#the-application-doesn-t-start-on-windows) for Azure App Service.

The Classic engine has native libraries for `win-x86` as well, but the Document Editor backend requires a 64-bit process.

### The Processor or the Operating System Isn't Supported

The application doesn't run on a Mac, on a server with an ARM64 processor, such as an AWS Graviton instance, or in an Alpine Linux container.

The packages contain native libraries for x64 processors on Windows and on Linux with the GNU C library (glibc) only. There are none for macOS, for ARM64 processors or for Linux distributions with the musl C library, such as Alpine. On Alpine, the application process ends when a document is created.

1. Run the application on x64 Windows or on an x64 Linux distribution with glibc, for example Ubuntu or Debian.
2. Choose x64 instance types, build agents and container base images. Tests that use `ServerTextControl` don't run on macOS or ARM64 build agents either.

[Linux Requirements](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/linux/requirements/#processor-architecture-and-c-library) lists the requirements of Linux systems, and [Processor Architectures](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/requirements/operating-systems/#processor-architectures) those of all systems.

### The Classic Engine Doesn't Run Outside Windows

An application that uses `TXTextControl.TextControl.ASP.SDK` or `TXTextControl.Web.DocumentViewer.Classic` is deployed to Linux or to a Linux container.

The Classic engine requires Windows. Its package contains native libraries for Windows only, and it can't be used on Linux or in Linux containers.

1. Replace `TXTextControl.TextControl.ASP.SDK` with `TXTextControl.TextControl.Core.SDK`. Both contain `ServerTextControl` in the `TXTextControl` namespace, so your code stays the same.
2. Replace `TXTextControl.Web.DocumentViewer.Classic` with `TXTextControl.Web.DocumentViewer`.
3. Follow the remaining steps in [From Classic to Core](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/previous-versions/#from-classic-to-core), which covers fonts, formats and testing.
4. If the application has to load or save DOC files, which only Classic supports, keep it on Windows.

[The Document Engine](https://docs.textcontrol.com/tx-text-control-dotnet-server/overview/architecture/#the-document-engine) compares the two engines.

### The Visual C++ Redistributable Is Missing

The application runs on a Windows server that has only the .NET runtime installed.

TX Text Control requires the Microsoft Visual C++ Redistributable for Visual Studio 2017, 2019 and 2022, in its x64 version, on Windows servers.

1. Install the x64 version of the Microsoft Visual C++ Redistributable for Visual Studio 2017, 2019 and 2022 on the server.

[What a Windows Server Needs](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/windows/#what-a-windows-server-needs) lists everything to install.

### Create Returns False

[ServerTextControl.Create](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/create-method/llms-full.txt) returns `false`, often only after the application has run for days. An instance that is used anyway throws this message:

```text
The TXTextControl object must have been completely loaded to use this method.
```

On Windows, a new instance can't be created when no new window handle can be created. Windows limits a process to 10,000 USER handles and 10,000 GDI handles, and instances that are never disposed keep theirs. This is the most common reason why `Create` returns `false`.

1. Create every `ServerTextControl` in a `using` block, so that it's disposed and releases its handles.
2. Check the return value of `Create`, and don't use the instance when it's `false`.
3. Count the instances your application creates and disposes, as [Dispose Every ServerTextControl](https://docs.textcontrol.com/tx-text-control-dotnet-server/performance/memory-usage/#dispose-every-servertextcontrol) shows.

There is no need to restart IIS or the worker process: dispose the instances, and their handles are released. The blog article [Diagnostics: When Calling ServerTextControl.Create() Failed](https://www.textcontrol.com/blog/2022/06/29/diagnostics-when-calling-servertextcontrolcreate-fails/) counts the handles of a process.

### The 64-Bit .NET Runtime Is Not Found

An application with the Document Editor ends during startup with this message:

```text
The 64 bit .NET runtime was not found. Please ensure that the 64 bit .NET runtime is installed on this machine.
```

The Document Editor backend `TXTextControl.Web.Server.Core` is a .NET application of its own, which the hosted service `DocumentEditorWorkerManager` starts as a separate process. On Windows, the manager looks for the 64-bit .NET runtime of the machine and starts the backend with it.

1. Install the .NET runtime in its x64 version. On a server with IIS, install the .NET Hosting Bundle, and don't install it with the option `OPT_NO_RUNTIME=1`, which leaves out the runtime.
2. On Linux, make sure that the `dotnet` command can be found by the application. See [.NET Runtime](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/linux/requirements/#net-runtime) in Linux Requirements.

[Prepare the Server](https://docs.textcontrol.com/tx-text-control-dotnet-server/deployment/windows/iis/#prepare-the-server) describes the installation on a Windows server.

### Related Pages

- [Linux](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/linux/llms-full.txt): system libraries and other problems on Linux.
- [IIS](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/iis/llms-full.txt) and [Azure](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/azure/llms-full.txt): the settings of the hosting environment.
- [Document Conversion](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/conversion/llms-full.txt): errors while loading and saving documents.
- [Product Architecture](https://docs.textcontrol.com/tx-text-control-dotnet-server/overview/architecture/llms-full.txt): how the engine, the backend and the web components fit together.

---

## Nearby

- **Previous:** [Document Conversion](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/conversion/llms-full.txt)
- **Next:** [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-server/examples/llms-full.txt)
