I have a code where I set licences for different aspose total products(I am using evaluation licence).
It sets licence the first time I call it but when I call set licecne second time I get an exception
"Root element is missing" I am not sure why calling it second time causes the issue. I am sure the licence file XML is correct.
private void SetLicences()
{
using (Stream licenceStream = "Aspose.Total.lic"))
{
Aspose.Words.License wordLicense = new Aspose.Words.License();
wordLicense.SetLicense(licenceStream); // This works fine
Aspose.Cells.License excelLicence = new Aspose.Cells.License();
excelLicence.SetLicense(licenceStream);\\this errors
Aspose.Pdf.License pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense(licenceStream);
}
}