Then, in your Program.cs , you retrieve the value and set it:
When you are ready to deploy, you must purchase a license. Iron Software offers various tiers:
// Apply the license key before any other IronPDF calls IronPdf.License.LicenseKey = "IRONPDF-YOUR-LICENSE-KEY-HERE"; ironpdf license key
Confirm the key starts with IRONPDF- . A common mistake is accidentally using an IRONOCR- or IRONXL- key. 2. Watermarks Still Appearing
Ensure the license key assignment is the first line of your Main() or Startup method. If using ASP.NET, place it in Program.cs before builder.Build() . Then, in your Program
"IronPdf.License.LicenseKey": "IRONPDF.YOUR.LICENSE.KEY.HERE" Use code with caution.
: Store your production production keys in secure vaults like Azure Key Vault, AWS Secrets Manager, or GitHub Secrets. "IronPdf
You can generate multiple license keys under one account. Use a for local development and your paid key for staging/production. This prevents accidental leakage of your production key.
Make sure the license key is set before any PDF generation logic is triggered.
Upon completing the purchase, you will receive your license key via email. Applying the License Key in .NET (C#)
: You can request a trial license key instantly. This key allows you to test all premium features in a live environment without watermarks for 30 days.