Aspose.Pdf version 20.1.0 license

Hi,
I have aspose.total license im trying to set licencse for aspose.pdf of version 20.1.0 of net40
getting error mentioned below but i tried with version 23.1,23.2,23.3 of net40 its working System.ArgumentException
HResult=0x80070057
Message=Unsupported algorithm
Source=Aspose.PDF
StackTrace:
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zMSHi$$Wy6UZdvFqpCTcxWXZNy5IO(Object #=zWDkdOyY=)
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zLVNqM2kpvBlAN3pQnQ==()
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zeIBqpf4eNTpKiKsO7EPcNj7IMbZ1WCfAGg==(Object #=zWDkdOyY=, UInt32 #=zLKb5EtE=)
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zimpozfx1sPNhdslhaYHDlpY=(Boolean #=zWDkdOyY=)
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zLnf6bU2gzFSC2_jsOoVppyA$0HgbMRL$jw==()
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zn8zCNo5Ng5MRSSCMgtsz9TPmdXsxu5SUwQ==(Object[] #=zWDkdOyY=, Type[] #=zLKb5EtE=, Type[] #=z9Ez5VsE=, Object[] #=zApGgiyg=)
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zSA0jaQklvNTHmH6g4CV9InvbJX1Kgc1koZjldMo=(Stream #=zWDkdOyY=, String #=zLKb5EtE=, Object[] #=z9Ez5VsE=, Type[] #=zApGgiyg=, Type[] #=zrVHxW0o=, Object[] #=zSszZUBs=)
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zHhC3m4Xx5Sq9mWUSzV19UHHyyL7X9xlYoRSF5YA8tqPZ(Stream #=zWDkdOyY=, String #=zLKb5EtE=, Object[] #=z9Ez5VsE=)
at #=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zm6JgrKnUWAGO$4mgdWMhabDvdw$S(Stream #=zWDkdOyY=, String #=zLKb5EtE=, Object[] #=z9Ez5VsE=)
at Aspose.Pdf.License.SetLicense(Stream stream)
at Ascentn.AgilePart.Misc.MiscAgilePart.RegisterAsposeLicense() in C:\Users\Admin\Desktop\NewActivitiesFiles\AddWatermarktopdf\MiscAgilePart\PDF\PDFAgilePart.cs:line 742
at Ascentn.AgilePart.Misc.MiscAgilePart…cctor() in C:\Users\Admin\Desktop\NewActivitiesFiles\AddWatermarktopdf\MiscAgilePart\PDF\PDFAgilePart.cs:line 22

This exception was originally thrown at this call stack:
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zMSHi$$Wy6UZdvFqpCTcxWXZNy5IO(object)
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zLVNqM2kpvBlAN3pQnQ==()
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zeIBqpf4eNTpKiKsO7EPcNj7IMbZ1WCfAGg==(object, uint)
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zimpozfx1sPNhdslhaYHDlpY=(bool)
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zLnf6bU2gzFSC2_jsOoVppyA$0HgbMRL$jw==()
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zn8zCNo5Ng5MRSSCMgtsz9TPmdXsxu5SUwQ==(object[], System.Type[], System.Type[], object[])
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zSA0jaQklvNTHmH6g4CV9InvbJX1Kgc1koZjldMo=(System.IO.Stream, string, object[], System.Type[], System.Type[], object[])
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zHhC3m4Xx5Sq9mWUSzV19UHHyyL7X9xlYoRSF5YA8tqPZ(System.IO.Stream, string, object[])
#=qAPeHTVJJWbx2hGWGRgpDD0x1BL_FtXQwaRP2HtiFlQ4=.#=zm6JgrKnUWAGO$4mgdWMhabDvdw$S(System.IO.Stream, string, object[])
Aspose.Pdf.License.SetLicense(System.IO.Stream)

[Call Stack Truncated]

@Darshan06

It seems you are encountering an ArgumentException with the message “Unsupported algorithm” when trying to set the license for Aspose.PDF version 20.1.0. This issue may arise due to compatibility problems between the license file and the specific version of the Aspose.PDF library you are using.

Here are a few steps you can take to troubleshoot and resolve this issue:

  1. Check License Compatibility: Ensure that the license file you are using is compatible with the version of Aspose.PDF you are trying to use. Sometimes, licenses are version-specific, and using an older license with a newer version of the library (or vice versa) can lead to such errors.

  2. Use the Latest Version: Since you mentioned that the license works with versions 23.1, 23.2, and 23.3, consider upgrading your project to use one of these versions instead of 20.1.0. This could resolve the issue if the newer versions have fixed any underlying problems.

  3. Setting the License: Make sure you are setting the license correctly in your code. Here’s a sample code snippet for setting the license:

    using Aspose.Pdf;
    
    License license = new License();
    license.SetLicense("path/to/your/license/file.lic");
    

    Ensure that the path to the license file is correct and accessible.

  4. Check for Updates: If you are using an older version of the library, consider checking for updates or patches that might address this issue.

  5. Contact Support: If the problem persists, consider reaching out to Aspose support for further assistance. They may provide insights specific to your license or the version you are using.

If you follow these steps, you should be able to resolve the licensing issue with Aspose.PDF. If you have any further questions or need additional assistance, feel free to ask!

thanks for update,
everything mention above is checked can you please provide exact reason why it throwing error for version 20.1.

@Darshan06,

You are trying to use an older version (20.1.0) of the Aspose.PDF API with your newer Aspose.Total license. Please note, we have improved licensing mechanism. Newer licenses are signed with SHA256, while older licenses were signed with SHA1. Unfortunately, a SHA256 license cannot be used with older API versions (typically those older than 2-3 years).

To address this, you may continue using your older license with the older API versions and the new license with the newer API versions—this approach will always work seamlessly. Alternatively, you have the option to request a SHA1-encoded license (free of charge) from the Aspose.Purchase section or Sales category. This SHA1 license will be compatible with both older and newer versions of the Aspose (.NET) APIs.

Let us know if you still find the issue after doing the needful (as suggested above).