Free Support Forum - aspose.com

ASPOSE.Total paid license raising evaluation mode error

Hi Support,

We are using ASPOSE.Total paid license for long time. One license is on PROD and one on our Test server.

ASPOSE is working fine but sometimes we receive evaluation mode error only on our PROD environment. We checked and confirmed that license file is updated and been properly initiated in global.asax (Session_start event). This issue is interim and get resolved automatically after sometime (after few hours or sometimes after few days).

We are mainly using ASPOSE.PDF but apart from this following are the details of all ASPOSE products that we are using.

ASPOSE.PDF (v18.7.0)
ASPOSE.Cells (v18.7.0)
ASPOSE.OCR (v17.11.0)
ASPOSE.Words (v18.7.0)

LicenseType: Developer Small Business
LicenseNote: Limited to 2 developers, limited to 2 physical locations
Product: Aspose.Total for .NET
EditionType: Enterprise
SubscriptionExpiry: 20210712
LicenseVersion: 3.0
Platform: .NET

Following is the code from global.asax to set the license.

protected void Session_Start(object sender, EventArgs e)
{
    try
    {

            string licenseFileName = "Aspose.Total.Production.lic";

            Aspose.Words.License lic = new Aspose.Words.License();
            if (lic != null)
                lic.SetLicense(licenseFileName);

            Aspose.Pdf.License pdflic = new Aspose.Pdf.License();
            if (pdflic != null)
                pdflic.SetLicense(licenseFileName);

            Aspose.Cells.License cellslic = new Aspose.Cells.License();
            if (cellslic != null)
                cellslic.SetLicense(licenseFileName);

            Aspose.OCR.License ocrlic = new Aspose.OCR.License();
            if (ocrlic != null)
                ocrlic.SetLicense(licenseFileName);
   }

}

Please let me know what is the issue and how this can be resolved permanently. As I mentioned we are getting issue only on our PROD environment therefore any quick response/help will be really appreciated.

@asimjamweb

Can you please consider loading the license files in Application_Start instead of Session_Start. Secondly, the versions that you are using have a boolean property IsLicensed in License class. You can use that in your application to get to know if the License is properly loaded or not. If the isLicensed return you false, you can load the license.

Thanks for the reply.
I have moved license initializing code from Session_Start event to Application_Start event and will see if this this issue is fixed permanently.

Also I checked and found that IsLicense property is only available for Word and OCR license objects but I cannot see this property against PDF and Cells license objects. I checked and reconfirmed that license versions as mentioned earlier are correct.

This property was available in older product versions and have been discontinued by mid of 2019. More or less, all APIs have this property.