Loading License file throws exception

Hi,


I’ve run into an issue, which appears to be pretty common from the forum, in which License.SetLicense() throws an exception.

I have the following code to determine if the license has already been loaded:
private static void LoadAsposeLicense()
{
//First check if it’s already been loaded - if not fire away…
if (!Document.IsLicensed)
{
Aspose.Pdf.License license = new License();
license.SetLicense(“Aspose.Pdf.lic”);
license.Embedded = true;//added to indicate that the licence is an embedded resource
}
}

However we’re intermittently getting:
ERROR Portal.Controllers.QRController -
at ?..?(Stream )
at ?..?(String , Assembly )
at Aspose.Pdf.License.SetLicense(String licenseName)
at Generator.LoadAsposeLicense() in Generator.cs:line 1122

The license file itself is marked as an embedded resource in the resource properties.
This only appears to be an issue after upgrading from Aspose.pdf 9.8.x to 10.2.0

Cheers,
Tristan


Hi Tristan,


We are sorry for the inconvenience caused. Please note License exception varies case to case. We will appreciate it if you please share your license via email and some executable sample code to replicate the issue at our end. We will look into it and will guide you accordingly.

Moreover, please confirm you are using same license with 9.8 and 10.2.0 or got new license for 10.2.0.

Best Regards,

Thanks Tilal, details sent through email

Hi Tristan,


Thanks for sharing license file via email and other details. However, I am afraid we can not suggest you any thing without replicating the issue at our end. We will appreciate it if you share some sample project to replicate the issue at our end. So we can investigate it and provide you solution.

Meanwhile, Can you please upgrade to latest version of Aspose.Pdf for .NET 10.4.0 and share the results? As in recent releases we have fixed some multi-threading / mutli-processing performance issues.

Best Regards