Using IronPrint License Keys

How to Get a License Key

Adding an IronPrint 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 IronPrint

Step 2: Apply Your License Key

Set your license using code

Add this code to the startup of your application, before IronPrint is used. Make sure to replace YOUR_LICENSE_KEY with your actual IronPrint license key.

using IronPrint;

class Program
{
    static void Main()
    {
        // Apply the IronPrint license key at the start of your application
        IronPrint.LicenseKey = "YOUR_LICENSE_KEY";

        // Verify that the license key is applied
        if (IronPrint.License.IsLicensed)
        {
            Console.WriteLine("License is applied successfully.");
        }
        else
        {
            Console.WriteLine("Failed to apply the license.");
        }

        // Start using IronPrint features
        // Your code logic goes here
    }
}
using IronPrint;

class Program
{
    static void Main()
    {
        // Apply the IronPrint license key at the start of your application
        IronPrint.LicenseKey = "YOUR_LICENSE_KEY";

        // Verify that the license key is applied
        if (IronPrint.License.IsLicensed)
        {
            Console.WriteLine("License is applied successfully.");
        }
        else
        {
            Console.WriteLine("Failed to apply the license.");
        }

        // Start using IronPrint features
        // Your code logic goes here
    }
}
Imports IronPrint

Friend Class Program
	Shared Sub Main()
		' Apply the IronPrint license key at the start of your application
		IronPrint.LicenseKey = "YOUR_LICENSE_KEY"

		' Verify that the license key is applied
		If IronPrint.License.IsLicensed Then
			Console.WriteLine("License is applied successfully.")
		Else
			Console.WriteLine("Failed to apply the license.")
		End If

		' Start using IronPrint features
		' Your code logic goes here
	End Sub
End Class
$vbLabelText   $csharpLabel

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="IronPrint.LicenseKey" value="IRONPRINT.MYLICENSE.KEY.1EF01"/>
  </appSettings>
  ...
</configuration>
<configuration>
  ...
  <appSettings>
    <add key="IronPrint.LicenseKey" value="IRONPRINT.MYLICENSE.KEY.1EF01"/>
  </appSettings>
  ...
</configuration>
XML

There is a known licensing issue with the IronPrint version released before 2024.3.6 on projects:

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

Ensure that IronPrint.License.IsLicensed returns true to verify that your application is licensed correctly.


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

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

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

{
    "IronPrint.LicenseKey": "IRONPRINT.MYLICENSE.KEY.1EF01"
}

Step 3: Validate Your License Key

Verify the Installed License Key

To verify whether the license key has been applied correctly, you can check the IsLicensed property. Use the following code snippet:

using IronPrint;

class LicenseCheck
{
    static void Main()
    {
        // Check if the license is applied
        bool isLicensed = IronPrint.License.IsLicensed;
        Console.WriteLine(isLicensed ? "License applied." : "License not applied.");
    }
}
using IronPrint;

class LicenseCheck
{
    static void Main()
    {
        // Check if the license is applied
        bool isLicensed = IronPrint.License.IsLicensed;
        Console.WriteLine(isLicensed ? "License applied." : "License not applied.");
    }
}
Imports IronPrint

Friend Class LicenseCheck
	Shared Sub Main()
		' Check if the license is applied
		Dim isLicensed As Boolean = IronPrint.License.IsLicensed
		Console.WriteLine(If(isLicensed, "License applied.", "License not applied."))
	End Sub
End Class
$vbLabelText   $csharpLabel

Validate the License Key

To ensure the validity of your license or trial key, you can use the following code snippet:

using IronPrint;

class ValidateLicense
{
    static void Main()
    {
        // Validate license or trial key
        bool isValid = IronPrint.License.IsValid;
        Console.WriteLine(isValid ? "License key is valid." : "License key is invalid.");
    }
}
using IronPrint;

class ValidateLicense
{
    static void Main()
    {
        // Validate license or trial key
        bool isValid = IronPrint.License.IsValid;
        Console.WriteLine(isValid ? "License key is valid." : "License key is invalid.");
    }
}
Imports IronPrint

Friend Class ValidateLicense
	Shared Sub Main()
		' Validate license or trial key
		Dim isValid As Boolean = IronPrint.License.IsValid
		Console.WriteLine(If(isValid, "License key is valid.", "License key is invalid."))
	End Sub
End Class
$vbLabelText   $csharpLabel

If the return value is True, it means the key is valid, and you can proceed with using IronPrint. However, if the return value is False, it indicates that the key is invalid.


Step 4: Getting Started with Your Project

To get started with IronPrint, we highly recommend following our comprehensive tutorial on how to Get Started with IronPrint. This tutorial offers detailed instructions and examples to help you grasp the basics of using IronPrint.


Questions or Need Support?

To use IronPrint in live projects, you'll require a paid or trial license key, which you can obtain by purchasing a license. The trial license is available by visiting this link.

For a comprehensive collection of code examples, tutorials, licensing details, and extensive documentation, please visit the IronPrint section on our website.

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

Frequently Asked Questions

How can I obtain a license key for my C# print application?

You can purchase a license key from the IronPrint licensing page or sign up for a free 30-day trial key to deploy your project live without restrictions.

What are the steps to apply a license key in C#?

To apply a license key in C#, use the code IronPrint.LicenseKey = "YOUR_LICENSE_KEY"; at the startup of your application. Replace "YOUR_LICENSE_KEY" with your actual license key.

How do I set a license key in Web.Config or App.Config?

Add your license key to the appSettings section of your config file using: <add key="IronPrint.LicenseKey" value="YOUR_LICENSE_KEY"/>.

What should I do if my license key is not being applied in Web.config?

Ensure you are using a version released after 2024.3.6. If issues persist, refer to the 'Setting License Key in Web.config' troubleshooting article on the IronPrint website.

How can I apply a license key in a .NET Core application?

In a .NET Core application, add an appsettings.json file with a key-value pair: { "IronPrint.LicenseKey": "YOUR_LICENSE_KEY" } and set its properties to 'Copy to Output Directory: Copy always'.

How can I verify if my IronPrint license key is applied correctly?

Use the code snippet bool isLicensed = IronPrint.License.IsLicensed; to check if your license key is correctly applied. A return value of true indicates successful application.

How do I validate the validity of my IronPrint license key?

To validate your license key, use bool isValid = IronPrint.License.IsValid;. If it returns true, your key is valid.

Where can I find resources to get started with IronPrint?

Visit the IronPrint website for comprehensive tutorials, code examples, and extensive documentation to help you get started with using IronPrint in your projects.

What should I do if I need support with IronPrint?

For support, you can emailor explore the IronPrint section on the Iron Software website for additional resources and documentation.

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.
Talk to an Expert Five Star Trust Score Rating

Ready to Get Started?

Nuget Passed