We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Setting Aspose Total License: How to validate in .Net 3.5

Issue: License is getting set, however evaluation watermark still appears in files
Version: 22.8
Platform: Net 3.5



I’ve just received a new license for Aspose Total from my team today and I’ve been working on replacing and implementing an update to our Aspose Product Libraries. I’ve replaced the DLLs with version 22.8 and replaced the license with our new one. The license file is in the same directory as this code below. I then confirmed the licenses are getting set for each product library at the entrypoint to the application. Despite all this I still see evaluation watermarks in our documents after we process them. Is it possible the license is still set incorrectly? Would it be worthwhile to supply a moderator with out license to test on a test application to confirm its validity?

I’m posting a code snippet here for demonstrate the approach we’ve used. This constructor I confirmed to be the entrypoint to the Project’s execution. Thank you!

public partial class ElectronicDocumentTransformerService : IElectronicDocumentTransformerService

    ////Private variables class level are declared here
    static readonly object _locker = new object();
    private bool _PerformancelogForAddInputAccel;
    private static Aspose.Pdf.License _licensePdf;
    private static Aspose.Cells.License _licenseCells;
    private static Aspose.Words.License _licenseWords;
    private static Aspose.Pdf.License _licensePdfKit;
    private static Aspose.BarCode.License _licensebarcode;

    /// <summary>
    /// Default constuctor, which loads the Aspose license files, if necessary. 
    /// </summary>

    public ElectronicDocumentTransformerService()
        lock (_locker)
           //Pdf License              
           if (_licensePdf == null)
               _licensePdf = new Aspose.Pdf.License();

           //Cells License
           if (_licenseCells == null)
               _licenseCells = new Aspose.Cells.License();

           //Words License
           if (_licenseWords == null)
               _licenseWords = new Aspose.Words.License();

           //PDF Kit license
           if (_licensePdfKit == null)
               _licensePdfKit = new Aspose.Pdf.License();

           //Barcode license
           if (_licensebarcode == null)
               _licensebarcode = new Aspose.BarCode.License();


Thanks for the details.

Do you get evaluation watermarks for all the Aspose for .NET APIs (that you are using) or for some specific APIs, please elaborate? Moreover, please confirm (via some breakpoints) if the code regarding (setting license) is processed or not? If it is indeed processed, then you might be using newer license with older Aspose (.NET) APIs. For example, newer license for Aspose.Cells for .NET is signed with sha 256 which can only work with newer Aspose.Cells for .NET versions. Please note older licenses were signed with sha1. So, if you use newer license with older versions of the APIs, this issue might happen. Please make sure if you are using newer license with newer Aspose for .NET APIs and not with older versions of the APIs (here you may output version number of the API, e.g. see the document on how to check version number of Aspose.Cells APIs). If you need to use newer license with older version of the APIs, you may use your previous license that will work fine.

PS. Aspose for .NET APIs support to determine if the license is set/loaded or not. For example, Aspose.Cells provides Workbook.IsLicensed property which you can use to determine if the license is loaded successfully or not. If you access this property before setting the license, it will return false and if you will call this property after setting the license, it will return true indicating that license has been loaded successfully, see the document for your reference.