Hello,
I have the most current Aspose .NET Total
and using Nuget packages
Word v21.5.0
PDF version: 21.5.0
Barcode v21.4.0
I created a very simple .NET CORE 3.1 API and published to Azure.
When I run the app locally, this API method works fine,
But when I deploy to Azure as an App Service
The PDF license causes error.
see the code below…
[Route(“Test”)]
[HttpGet]
public IActionResult Test()
{
try
{
// these 2 lines work fine.
Aspose.Words.License wordlicense = new Aspose.Words.License();
wordlicense.SetLicense(“Aspose.Total.NET.lic”);
// The 2 lines below DO NOT work and I get a HTTP 500 Error in Azure
// also the try catch block does not get triggered.
Aspose.Pdf.License pdflicense = new Aspose.Pdf.License();
pdflicense.SetLicense("Aspose.Total.NET.lic");
// these 2 lines work fine
Aspose.BarCode.License barCodeLicense = new Aspose.BarCode.License();
barCodeLicense.SetLicense("Aspose.Total.NET.lic");
return Ok("All Aspose Lics are initialized");
}
catch (Exception ex)
{
return Ok($"{ex.Message}<br/><br/>{ex.StackTrace}");
}
}