# Licensing

> Fix license problems of TX Text Control .NET Server: trial text in documents, an expired trial, controls that could not be licensed and LicenseLevelException.

- **Product:** TX Text Control .NET Server
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET Server > Troubleshooting > Licensing
- **1424 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/licensing/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/licensing/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/licensing/llms-full.txt

---

A license problem shows up in one of two ways: documents contain trial text, or TX Text Control throws an exception with a license message. The messages below are the ones TX Text Control .NET Server 34.0 uses. [License Configuration](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/licensing/llms-full.txt) explains how the license reaches an application in the first place.

### Check Which Version Your Application Runs

Before you change anything, find out which product level the application uses. Paste the following code into a console application, or run it at the place where the problem occurs:

```csharp
using TXTextControl;

using (ServerTextControl tx = new ServerTextControl())
{
    tx.Create();

    // Prints Trial, Server or another product level
    Console.WriteLine(tx.GetVersionInfo().Level);
}
```

[GetVersionInfo](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/getversioninfo-method/llms-full.txt) returns a [VersionInfo](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/versioninfo/llms-full.txt) object, and its `Level` property, documented as [ProductLevel](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/versioninfo/productlevel-property/llms-full.txt), is `Trial` when the trial version is installed and `Server` for the licensed TX Text Control .NET Server. The other values are `Standard`, `Professional` and `Enterprise`.

### Documents Contain Trial Text

The documents your application creates contain a note that they were created with the TX Text Control trial version.

The application was built with trial packages. The trial setup installs a Text Control Offline Packages source whose packages add this text to every document they create. The license agreement forbids removing the text.

1. Remove the trial packages from the project.
2. Install the licensed packages from the Text Control Private NuGet Feed or from the Text Control Offline Packages of the licensed setup.
3. Rebuild and redeploy the application.

[Trial and Licensed Packages](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/licensing/development/#trial-and-licensed-packages) describes how to tell the packages apart.

### The Trial Version Has Expired

TX Text Control reports this message:

```text
The Trial Version has expired.
```

The trial version is valid for 30 days.

1. If you have a license, install the licensed packages and rebuild the application, as in the previous section.
2. If you need more time to evaluate, contact the [Text Control sales team](https://www.textcontrol.com/contact/).

### A Control Could Not Be Licensed

An exception starts with this message, followed by the name of the class:

```text
The following control could not be licensed:
```

TX Text Control didn't find a license in the assembly it checks. By default, this is the executable assembly of the application. When TX Text Control runs in a class library, the license is embedded in the class library instead, for example when the library is called from an application that doesn't reference TX Text Control, or when NUnit or MSTest run its tests.

1. Make sure that the class library references a licensed SDK package. The package adds the license file *txtextcontrol.server.license* to the project as an embedded resource; don't add the file yourself.
2. Set [ServerTextControl.EntryAssembly](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/servertextcontrol/entryassembly-property/llms-full.txt) to the class library, for example `typeof(Class1).Assembly`, in a static constructor that runs before the first `ServerTextControl` is created.
3. Rebuild the class library and the application or test project that calls it.

[Class Libraries and Unit Tests](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/licensing/development/#class-libraries-and-unit-tests) shows the complete class library with an NUnit test.

#### Applications on the .NET Framework

Applications on the .NET Framework still license TX Text Control with a *licenses.licx* file, and since version 30.0 every entry needs the full version number; otherwise an older version can be used, which leads to a license error. The entry for version 34.0 is:

```text
TXTextControl.ServerTextControl, TXTextControl.Server, Version=34.0.1900.500, Culture=neutral, PublicKeyToken=6b83fe9a75cfb638
```

After an upgrade, change the version in *licenses.licx*, close and reopen Visual Studio and rebuild the solution. [License File Changes](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/upgrading/previous-versions/#license-file-changes) describes the file for each kind of project.

### A Feature Throws LicenseLevelException

A [LicenseLevelException](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/licenselevelexception/llms-full.txt) is thrown with one of these messages:

```text
This feature is not available. The TX Text Control Server version must be installed.
This feature is not available in the TX Text Control Standard version. At least the Professional version must be installed.
This feature is not available in the TX Text Control Standard or Professional version. The TX Text Control Enterprise version must be installed.
```

The feature isn't part of the product level the application is licensed for. The message names the level the feature requires.

1. Check the product level with the code in [Check Which Version Your Application Runs](#check-which-version-your-application-runs).
2. For questions about the product levels and upgrades, contact the [Text Control sales team](https://www.textcontrol.com/contact/).

### A Web Package From nuget.org Requires the Trial Version

`TXTextControl.Web` or `TXTextControl.Web.DocumentViewer` was installed from nuget.org instead of a Text Control package source, and its package description asks for the trial version on the development machine. [Trial and Licensed Packages](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/licensing/development/#trial-and-licensed-packages) explains why.

1. Remove the packages that came from nuget.org.
2. Install them from the source **TextControl**, with the same major version as your SDK package. See [Installation](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/installation/#the-packages-have-different-versions).

### Related Pages

- [Development Licenses](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/licensing/development/llms-full.txt): how the license gets into your projects.
- [Runtime Licenses](https://docs.textcontrol.com/tx-text-control-dotnet-server/installation/licensing/runtime/llms-full.txt): licenses for the servers your application runs on.
- [NuGet Authentication](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/nuget-authentication/llms-full.txt): problems with the private feed.
- [Licensing Overview](https://docs.textcontrol.com/tx-text-control-dotnet-server/overview/licensing/llms-full.txt): the licensing model of TX Text Control .NET Server.

---

## Nearby

- **Previous:** [NuGet Authentication](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/nuget-authentication/llms-full.txt)
- **Next:** [Document Editor](https://docs.textcontrol.com/tx-text-control-dotnet-server/troubleshooting/document-editor/llms-full.txt)
