I am planning to integrate Aspose pdf in my .net 8 application.I installed the relevant nuget packages in my project and copied the xml license data from my old application and pasted in the new project under a config folder.
Now I created a new key in my appsettings and give the path there.
When I am set the corresponding licenses using SetLicense() i am getting some error like " System.IO.FileNotFoundException: 'Cannot find license '<?xml version="1.0"?>
"
service
string path = config["ApsoseLicense:Path"];
var data = File.ReadAllText(path);
var wordLicense = new Aspose.Words.License();
wordLicense.SetLicense(data);
var excelLicense = new Aspose.Cells.License();
excelLicense.SetLicense("path");
var pptLicense = new Aspose.Slides.License();
pptLicense.SetLicense("path");
var pdfLicense = new Aspose.Pdf.License();
pdfLicense.SetLicense("path");
var emailLicense = new Aspose.Email.License();
emailLicense.SetLicense("path");
var imageLicense = new Aspose.Imaging.License();
imageLicense.SetLicense("path");
appsettings:
“ApsoseLicense”: {
“Path”: “config/Aspose.Pdf.lic”
}
need a help to sort out the issue?