The issue we are having is that after creating the license object, we are unable to use the SetLicense method to actually register the license with the software. The error we recieve is that the variable name for the license object needs to be declared.
This message was posted using Email2Forum by DannyCooper.
Please share your code that you are using the set the license file. I have already sent your license files to the developers so they can look over them. Here is how you are supposed to set it: http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/HowToUseLicense.html. The developer will help you shortly.
I have checked your license file for Aspose.Slides and there is no problem with it. It seems there is some coding problem, probably you are not declaring license object.
Since, you have two license files for two products; so you need to set both of them separately. Every product has its own license class e.g
It means, for using license of various products, you will have to use complete name of License class to avoid ambiguous names in different namespaces. e.g
So the proper way of setting license would be like this in C#
Aspose.Slides.License slidesLic = new Aspose.Slides.License();
slidesLic.SetLicense(pathToYourSlideLicense);
Aspose.PDF.Kit.License pdfkitLic = new Aspose.PDF.Kit.License();
pdfkitLic.SetLicense(pathToYourPdfKitlLicense);
so on …
One more thing, you must set the license before using any other product API.
For general programming information, please see products WIKI, for example, the Aspose.Slides.Wiki can be found at this link.
I originally had the code like that, however after participating in a live chat with ‘AdeelTaseer’ I changed it to the code I previously posted. I’ve changed the code back to match the example you’ve given and I still get the error.
'* licensing Instructions - from the .xml lic file '* that is received from ASPOSE, uncomment this code, '* place the lic file in the bin directory of the '* application and recomplile the program. The application '* will have to be uninstalled and reinstalled.
'UNCOMMENT NEXT LINE AFTER RECEIVING .LIC LICENSE FROM ASPOSE Dim license As Aspose.Pdf.Kit.License = New Aspose.Pdf.Kit.License() license.SetLicense(“Aspose.Pdf.Kit.lic”)
Dim lic2 As Aspose.Slides.License = New Aspose.Slides.License() lic2.SetLicense(“Aspose.Slides.lic”)
Protected Overrides Sub OnStart(ByVal args() As String) ’ Add code here to start your service. This method should set things ’ in motion so your service can do its work.