TX Text Control .NET Server

Licensing

Topic

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 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:

using TXTextControl;

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

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

GetVersionInfo returns a VersionInfo object, and its Level property, documented as ProductLevel, 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 describes how to tell the packages apart.

The Trial Version Has Expired

TX Text Control reports this message:

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.

A Control Could Not Be Licensed

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

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 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 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:

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 describes the file for each kind of project.

A Feature Throws LicenseLevelException

A LicenseLevelException is thrown with one of these messages:

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.
  2. For questions about the product levels and upgrades, contact the Text Control sales team.

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 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.