Using IronOCR License Keys

How to Get a License Key

Adding an IronOCR license key allows you to deploy your project live without restrictions or watermarks.

You can buy a license key or sign up for a free 30 day trial key here.


Step 1: Download the Latest Version of IronOCR

Start using IronOCR in your project today with a free trial.

First Step:
green arrow pointer

Install via DLL

Download the IronOcr DLL directly to your machine.

Install via NuGet

Alternatively, you can install through NuGet.

# Run the following command in your terminal to install IronOcr via NuGet
nuget install IronOcr
# Run the following command in your terminal to install IronOcr via NuGet
nuget install IronOcr
SHELL

Step 2: Apply Your License Key

Set your IronOCR license key using code

Add this code to the startup of your application, before IronOCR is used.

// Set your IronOCR license key at the beginning of your application
IronOcr.License.LicenseKey = "IRONOCR-MYLICENSE-KEY-1EF01";
// Set your IronOCR license key at the beginning of your application
IronOcr.License.LicenseKey = "IRONOCR-MYLICENSE-KEY-1EF01";
' Set your IronOCR license key at the beginning of your application
IronOcr.License.LicenseKey = "IRONOCR-MYLICENSE-KEY-1EF01"
$vbLabelText   $csharpLabel

You can validate that your software is licensed using either IronOcr.License.IsValidLicense(string LicenseKey) or the IronOcr.License.IsLicensed property.


Set your license key using Web.Config or App.Config

To apply a key globally to your application using Web.Config or App.Config, add the following key to your config file in appSettings.

<configuration>
  ...
  <appSettings>
    <!-- Set your IronOCR license key here -->
    <add key="IronOcr.LicenseKey" value="IRONOCR-MYLICENSE-KEY-1EF01"/>
  </appSettings>
  ...
</configuration>
<configuration>
  ...
  <appSettings>
    <!-- Set your IronOCR license key here -->
    <add key="IronOcr.LicenseKey" value="IRONOCR-MYLICENSE-KEY-1EF01"/>
  </appSettings>
  ...
</configuration>
XML

There is a known licensing issue between IronOcr version 2023.4.13 - 2024.3.4 on project:

  • ASP.NET projects
  • .NET Framework version >= 4.6.2

The key stored in a Web.config file is NOT being picked up and used by the product. Visit the 'Setting License Key in Web.config' troubleshooting article to learn more.


Set your key using a .NET Core appsettings.json file

To apply a key globally to your application with .NET Core:

  • Add a JSON file to your project called appsettings.json in the root directory of your project.
  • Add a 'IronOcr.LicenseKey' key to your JSON config file. The value should be your license key.
  • Ensure that the file properties include Copy to Output Directory: Copy always.
  • Ensure that IronOcr.License.IsLicensed returns true to verify.

File: appsettings.json

{
  "IronOcr.LicenseKey": "IRONOCR-MYLICENSE-KEY-1EF01"
}

Step 3: Test your key

Test if your key has been installed correctly.

// Validate the license key
bool result = IronOcr.License.IsValidLicense("IRONOCR-MYLICENSE-KEY-1EF01");
// Validate the license key
bool result = IronOcr.License.IsValidLicense("IRONOCR-MYLICENSE-KEY-1EF01");
' Validate the license key
Dim result As Boolean = IronOcr.License.IsValidLicense("IRONOCR-MYLICENSE-KEY-1EF01")
$vbLabelText   $csharpLabel

Step 4: Get started with your project

Follow our tutorial on how to Get Started with IronOCR.


Questions?

If you have any questions, reach out to support@ironsoftware.com

Frequently Asked Questions

How can I obtain a license key for my .NET OCR project?

You can purchase a license key or sign up for a free 30-day trial key on the IronOCR website. This allows you to deploy your project without restrictions or watermarks.

What are the steps to install IronOCR via DLL?

To install IronOCR via DLL, download the IronOCR DLL directly from the IronOCR website to your machine and include it in your project.

How can I install IronOCR using NuGet?

You can install IronOCR using NuGet by running the command nuget install IronOcr in your terminal.

How do I apply a license key in my C# application?

Add the code IronOcr.License.LicenseKey = "YOUR-LICENSE-KEY"; at the beginning of your application's startup to apply the license key.

Can I set my IronOCR license key using configuration files?

Yes, you can set your license key globally using Web.Config or App.Config by adding it to the appSettings section, or for .NET Core applications, by using the appsettings.json file.

What should I do if my license key isn't recognized in Web.Config?

For ASP.NET projects and .NET Framework version >= 4.6.2, there is a known issue where the key in Web.config might not be recognized. Refer to the troubleshooting article on IronOCR's website for more details.

How do I test if my IronOCR license key is installed correctly?

Use the method IronOcr.License.IsValidLicense("YOUR-LICENSE-KEY") to validate if your license key is installed correctly.

What should I do if I encounter issues with IronOCR license keys?

If you encounter any issues, you can reach out to Iron Software support at support@ironsoftware.com for assistance.

Chaknith Bin
Software Engineer
Chaknith works on IronXL and IronBarcode. He has deep expertise in C# and .NET, helping improve the software and support customers. His insights from user interactions contribute to better products, documentation, and overall experience.