Apply a license key in IronQR

Set your license using code

The license key is a long string that ends with an expiry date. Please ensure this is copied correctly, with no spaces.

IronQR-MYLICENSE-KEY-1EF01-RENEW.SUPPORT.01.JAN.2050

The most robust method of applying a license key is directly in your code, before the library is called.


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="IronQr.LicenseKey" value="IRONQR-MYLICENSE-KEY-1EF01"/>

    </appSettings>
    ....
</configuration>
XML

__

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

{

    "IronQr.LicenseKey":"IRONQR-MYLICENSE-KEY-1EF01"
}  

Test your key

Test if your key has been installed correctly.

bool result = IronQr.License.IsValidLicense("IRONQR-MYLICENSE-KEY-1EF01");

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

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

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