Still showing Evaluation copy even after applying the license

I applied the pdf license copy and still getting evaluation copy warning in filehandler:IHTTPHandler
if (mimeType.ToLower().Contains(“pdf”))
{
Aspose.Pdf.License pdflic = new Aspose.Pdf.License();

            try
            {
                string asposeLicensePdfLocation = ConfigurationManager.AppSettings["AsposePdfLicenseLocation"];
                if (!String.IsNullOrWhiteSpace(asposeLicensePdfLocation))
                {
                    if (asposeLicensePdfLocation[asposeLicensePdfLocation.Length - 1] != '\\' && asposeLicensePdfLocation[asposeLicensePdfLocation.Length - 1] != '/')
                        asposeLicensePdfLocation = asposeLicensePdfLocation + "\\";

                    if (Directory.Exists(asposeLicensePdfLocation))
                    {
                        try
                        {

                            byte[] documentPdfAsposeBytes = File.ReadAllBytes(asposeLicensePdfLocation + "Aspose.PDF.NET.lic");

                            pdflic.SetLicense(new MemoryStream(documentPdfAsposeBytes));
                        }
                        catch (Exception ex)
                        {
                            errorindocument.Append("linenumber155:AsposePdfLicenseRead "); errorindocument.Append(ex.StackTrace);
                            errorindocument.Append(ex.Message);
                            LoggingManager.LogManager.LogException(user, ex, this);

                        }
                    }
                }
            }
            catch (Exception ex)
            {
                errorindocument.Append("linenumber165: "); errorindocument.Append(ex.StackTrace); errorindocument.Append(ex.Message);
                LoggingManager.LogManager.LogException(user, ex, this);

            }
            Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(filePath);
            using (MemoryStream stream = new MemoryStream())
            {
                pdfDocument.Save(stream);
                stream.Position = 0;
                context.Response.ContentType = "application/pdf";
                context.Response.AddHeader("content-disposition", "inline; filename=" + docName);
                context.Response.BinaryWrite(stream.ToArray());
            }

@cio-20.ntsb.gov

It seems you are encountering an issue where the evaluation copy warning persists even after applying the license for Aspose.PDF. This can happen for several reasons. Here are some steps you can take to troubleshoot and resolve the issue:

  1. Ensure License File is Correctly Loaded: Make sure that the path to your license file is correct and that the file is accessible. You can verify this by checking if the file exists at the specified location.

  2. Set License Before Document Operations: The license must be set before any PDF document operations are performed. Ensure that the line where you set the license (pdflic.SetLicense(...)) is executed before you create or manipulate any Aspose.Pdf.Document objects.

  3. Check for Exceptions: If there are any exceptions thrown while loading the license, they should be logged. Make sure to check your logs for any errors that might indicate why the license is not being applied correctly.

  4. Use the Correct License Format: Ensure that the license file you are using is the correct one for the version of Aspose.PDF you are using. If you have multiple versions, make sure you are using the license that corresponds to the version of the library in your project.

  5. Temporary License: If you are using a temporary license, ensure that it has not expired. You can obtain a new temporary license from the Aspose website if needed.

Here is a simplified example of how to set the license correctly:

Aspose.Pdf.License pdflic = new Aspose.Pdf.License();
pdflic.SetLicense("path_to_your_license_file/Aspose.Pdf.NET.lic");

// Now proceed to create or manipulate your PDF document
Aspose.Pdf.Document pdfDocument = new Aspose.Pdf.Document(filePath);

By following these steps, you should be able to resolve the issue with the evaluation copy warning. If the problem persists, consider reaching out to Aspose support for further assistance.

I downloaded the license from the website and uploaded the file, but I’m still getting an invalid license error.

@cio-20.ntsb.gov

Can you please share complete description of the error and make sure that you are using the latest version of the API. In case error is still persisting with the latest version, please share your license file with us in a private message so that we can address the issue accordingly.

You can click on the username and press Blue Message Button to send a private message.

Error message is license is invalid for this product. I am using .net framework 4.5.2 version in webforms.
Aspose.pdf dll version used is18.4
image.png (211.8 KB)

@cio-20.ntsb.gov

We have replied to you in the private message where you can please share your license file. We will further proceed accordingly.

@cio-20.ntsb.gov

We tested your license file with 24.12 version and found it working fine.

Why are you using the new license with an older version of the API? If you want to keep using the older version, you can consume your old license (if you had any). The license you currently have is recently issued and supports higher and latest versions. Please upgrade to 24.12 (as always recommended) and let us know if you face any issues.

Thank you for confirming that it works for 24.12. We are using aspose.pdf version 18.4. How to make the license work for this version

@cio-20.ntsb.gov

Can you please share why you are using 18.4 version and not upgrading to 24.12? Have you been using the API in past? Do you have any older license copy?

This is a legacy application and we need 18.4 to work with it. We already have a license for 18.4 version for Microsoft Word

@cio-20.ntsb.gov

We have shifted our licenses to SHA256 signatures and its support is not present in the older versions. We strongly recommend that you please use the latest version of the API and if you face some issues while implementing it, please let us know. We will assist you accordingly.

I tried to upgrade to 24.12 using nuget package
and got the below error
Severity Code Description Project Path File Column Suppression State Line
Error Could not install package ‘Aspose.PDF 24.12.0’. You are trying to install this package into a project that targets ‘.NETFramework,Version=v4.5.1’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

@cio-20.ntsb.gov

You can download the supported DLLs from the link below for the latest version. Please note that these are outdated frameworks and are not being maintained. We recommend updating to the latest versions: