Skip to main

API Technical Specs

Learn how to configure and leverage our services to achieve your toughest recruiting needs.

Using your Sovren License Key

No-Coding Method [internal-use customers only]

The following methods do not involve any coding and are available and recommended for customers that use Sovren components internally and do not redistribute the Sovren components (but prohibited for uses where the software is distributed to clients of the licensee):

  • Install your global Sovren.lic file in a location that is accessible by all Sovren products (%ProgramData%\Sovren\Sovren.licso, typically: C:\ProgramData\Sovren\Sovren.lic)
  • Install your Sovren.lic file in the bin alongside the Sovren dlls.

Coding Method [required for ATS and other customers licensed to redistribute the software]

The coding method is available to customers using the .NET API, and it is a recommended approach for embedding the Sovren License Key when redistributing the Sovren components to your clients.

At any point in your code before you first use a Sovren component, call the SetLicense method on an instance of the License class. The license won’t be set correctly if the Sovren components have already been called from your code. Each Sovren namespace that enforces licensing has a License class. This currently includes: Sovren, DocumentConversion, and Sovren.ArtificialIntelligenceMatching.JobOrderParser. You only need to call SetLicense once on any one of these classes. You do not need to call it on each class or for every transaction, because all other Sovren assemblies and transactions will use the license specified in the SetLicense call.

License license = new License();
license.SetLicense(@"PD94bWwgdmVyc2lvbj0nMS4...");

You can pass any of the following values to SetLicense:

  • XML Sovren License Key
  • Inline Sovren License Key
  • Name of an embedded resource containing a valid Sovren License Key

If the license key passed to SetLicense is not valid, then a SovrenLicenseException will be thrown with an explanation of why it is not valid.

AppSetting

At any point in your code before you first use a Sovren component, add the Sovren.License app setting programmatically. This only needs to be done once, during application startup or before the first transaction, not for every transaction.

Here are some examples in C#:

ConfigurationManager.AppSettings["Sovren.License"] =
@"<?xml version='1.0' encoding='utf-8'?>
<License version='1'>
    <SerialNumber>e7d06411...</SerialNumber>
    <Company>Sovren</Company>
    ...
";

ConfigurationManager.AppSettings["Sovren.License"] = "PD94bWwgdmVyc2lvbj0nMS4...";

Embedded Resource Method

The embedded resource method is available to all customers using the .NET API, and it is a recommended approach if you will be redistributing the Sovren components to your clients.

To make the Sovren License Key an embedded resource in Visual Studio, do the following:

  1. Go to the project that is your application assembly, the one that will be returned by Assembly.GetEntryAssembly.
  2. Add the Sovren.lic file to that project.
  3. Click on the Sovren.lic file, and go to the Properties window (press F4 if it is not visible)
  4. Set Build Action to Embedded Resource
  5. Build your project
  6. At runtime, if the license is not specified or provided in some other way, then the embedded Sovren.lic in your EntryAssembly will be used.

Troubleshooting

As of version 8.0, when licensing errors occur, data is written to a SovrenLicenseLog.txt file. Collect this file and send it to support@sovren.com for analysis. The file will be located in the same directory as the Sovren.lic file. If the license is loaded from the app.config or set from code then it will be in the same directory as the Sovren .dlls, or for web applications in the root directory.

If this log file is not being created, then ensure that the user identity of the application has write access to its temp folder.