License not found exception for one product

Ok, we are talking old code here - one dll with an embeded Aspose.Total.lic -- and the license is working just fine for most of the products. In fact, "recently" it was working for all the products.

I have tied the problem to this: Apose.pdf 4.6 workds, but aspose.pdf v5.0.0 throws the exception.

And since only the aspose.pdf.license fails...I'm pretty sure my embedded resource is ok:

Dim pdfLicense As Aspose.Pdf.License = New Aspose.Pdf.License
pdfLicense.SetLicense("Aspose.Total.lic")

Convert to PDF error - System.IO.FileNotFoundException: Cannot find license 'Aspose.Total.lic'.
at ..(String , Assembly , Boolean )
at ..(String , Assembly )
at ..(String , Assembly , Boolean )
at Aspose.Pdf.License.SetLicense(String licenseName)
at Spitfire.sfWebTool.sfDocLinkBase.ConvertImageToPDF(String fileName, String title) in D:\SpitfireDev\sfDashboard\sfWebTool\sfDocLink.vb:line 2215

But this works:

Dim wordLicense As Aspose.Words.License = New Aspose.Words.License
wordLicense.SetLicense("Aspose.Total.lic")

AND

Dim xlLicense As Aspose.Cells.License = New Aspose.Cells.License
xlLicense.SetLicense("Aspose.Total.lic")

AND:

Dim license As New Aspose.Pdf.Kit.License
license.SetLicense("Aspose.Total.lic")


Aspose.Pdf, Version=5.0.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56
Aspose.Pdf.Kit, Version=5.3.0.0, Culture=neutral, PublicKeyToken=ae9e610db67fc2c1
Aspose.Words, Version=9.7.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56

Hello Stan,

Thanks for contacting support.

This reported issue is already known and has been logged in our issue tracking system as PDFNET-23909. The development team is working hard to get it resolved and as soon as we have some definite news regarding its resolution, we would be pleased to update you with the status of correction. We are really sorry for this inconvenience.

Thanks for the update.

In case it helps you, I tested 4.9 and it also fails.

Since it is a known problem, do you know when it was introduced?

Only 4.7 and 4.8 are left ...

Hello Stan,

The problem started occurring from release 4.9. But our team is trying their level best to get it resolved ASAP. Your patience and comprehension is greatly appreciated in this regard.

The issues you have found earlier (filed as 23909) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.
(7)

Sorry folks - still no good


Aspose.Pdf, Version=5.0.1.0, Culture=neutral, PublicKeyToken=716fcc553a201e56
2:14:31 PM: ConvertImageToPDF - System.IO.FileNotFoundException: Cannot find license 'Aspose.Total.lic'.
at ..€(String , Assembly , Boolean )
at ..€(String , Assembly )
at Aspose.Pdf.License.SetLicense(String licenseName)
at Spitfire.sfWebTool.sfDocLinkBase.ConvertImageToPDF(String fileName, String title)

And just like before, the other products in the same DLL with the same embedded resource license still work

Hello Stan,

When using the license file as an embedded resource, please enter project default namespace along with license file name.

During my testing with Aspose.Pdf for .NET 5.0.1 over Windows7 Professional 64Bit, I have included the license file into project, in properties I have specified its Build Action as "Embedded Resource" and in pdflic.SetLicense(...) method, I have provide the license file name along with project default namespace.

pdflic.SetLicense("WindowsTemplate.Aspose.Total.Product.Family.lic");

Where WindowsTemplate is the default namespace of my project. As per my observations, I am unable to notice the problem. You may also try using pdflic.Embedded = true; code line (pdflic is an object of Aspose.Pdf.License).

If the problem still persists, please share some details regarding your working environment and the license file that you are using. Please visit the following link for information on How to send a license?

We apologize for your inconvenience.

Adding embedded=true prior to the setLicense() call did the trick...

One would expect that to be a parameter on the setLicense() method....

Of course, this has led to another change in behavior...but I'll post that separately