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