Using Iron Barcode License Keys

Get Your License Key

IronBarcode license keys allow you to deploy your project live without any watermark.

Licenses start at just $499 and include one free year of support and updates.

You can also try IronBarcode free for 30 days with a trial license key.


Step 1: Download the Latest Version of IronBarcode

C# NuGet Library for

Install with NuGet

Install-Package BarCode
or
C#  DLL

Download DLL

Download DLL

Manually install into your project

Install via NuGet

Before we start we need to install the latest version of the Barcode NuGet Package.

 PM > Install-Package Barcode

https://www.nuget.org/packages/BarCode/

Install via DLL

As an alternative, the IronBarCode.Dll can be downloaded and added to your project as a reference from [.NET Barcode DLL].


Step 2: Apply Your License Key

Set your license using code

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

IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01";
IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01";
IronBarCode.License.LicenseKey = "IRONBARCODE-MYLICENSE-KEY-1EF01"
VB   C#

Set your license 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>
        <add key="IronBarCode.LicenseKey" value="IRONBARCODE-MYLICENSE-KEY-1EF01"/>
    </appSettings>
    ....
</configuration>
XML

Setting license key in web.config issue

There is a known licensing issue: in ASP.NET projects targeted .NET framework version >= 4.6.2. The key stored in a web.config file will NOT be picked up and used by the product.

To work around this issue it is recommended to read license key using ConfigurationManager from web.config in the code and apply it to the License.LicenseKey.

Example:

With the above XML file, we can use ConfigurationManager to retrieve and pass the license key value to IronBarCode.License.LicenseKey property.

using System.Configuration;

string licenseKey = ConfigurationManager.AppSettings["IronBarCode.LicenseKey"];

IronBarCode.License.LicenseKey = licenseKey;
using System.Configuration;

string licenseKey = ConfigurationManager.AppSettings["IronBarCode.LicenseKey"];

IronBarCode.License.LicenseKey = licenseKey;
Imports System.Configuration

Private licenseKey As String = ConfigurationManager.AppSettings("IronBarCode.LicenseKey")

IronBarCode.License.LicenseKey = licenseKey
VB   C#

Ensure that IronBarCode.License.IsLicensed returns true to verify.


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

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

  • Add a JSON file to your project called appsettings.json in the root directory of your project
  • Add a 'IronBarCode.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

File: appsettings.json

{

    "IronBarCode.LicenseKey":"IRONBARCODE-MYLICENSE-KEY-1EF01"
}  

Step 3: Test your key

Test if your key has been installed correctly.

bool result = IronBarCode.License.IsValidLicense("IRONBARCODE-MYLICENSE-KEY-1EF01");

// Check if IronBarCode is licensed successfully 
bool is_licensed = IronBarCode.License.IsLicensed;
bool result = IronBarCode.License.IsValidLicense("IRONBARCODE-MYLICENSE-KEY-1EF01");

// Check if IronBarCode is licensed successfully 
bool is_licensed = IronBarCode.License.IsLicensed;
Dim result As Boolean = IronBarCode.License.IsValidLicense("IRONBARCODE-MYLICENSE-KEY-1EF01")

' Check if IronBarCode is licensed successfully 
Dim is_licensed As Boolean = IronBarCode.License.IsLicensed
VB   C#

Step 4: Get started with your project

Follow our tutorial on how to Get Started with IronBarcode.


Questions?

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