Authentication Failed error on SetMeteredKey

Sudden ‘Authentication Failed’ error on the line Asposepdf.setmeteredkey(public key, private key) even though the keys are still valid and correct. Upgraded Aspose.Pdf to 24.10.0 but still having the same issue. Any leads on resolving this issue is greatly appreciated. Thank you in advance.

@s2205

The “Authentication Failed” error when using the SetMeteredKey method can be frustrating, especially if you are certain that your public and private keys are valid. Here are some steps you can take to troubleshoot and potentially resolve this issue:

  1. Verify Keys: Double-check that you are using the correct public and private keys. Ensure there are no extra spaces or hidden characters when copying them.

  2. Check Network Connectivity: Ensure that your application has internet access, as the metered licensing mechanism requires a connection to validate the keys.

  3. Update to Latest Version: Since you mentioned upgrading to version 24.10.0, ensure that this is indeed the latest version available. Sometimes, issues are resolved in newer releases.

  4. Metered Licensing Implementation: Make sure you are correctly implementing the metered licensing. Here’s a basic example of how to set the metered keys in C#:

    // Create an instance of the Metered class
    Metered metered = new Metered();
    // Set your public and private keys
    metered.SetMeteredKey("your_public_key", "your_private_key");
    
  5. Consult Documentation: Review the official documentation for any updates or changes related to metered licensing. There may be specific notes or FAQs that address common issues.

  6. Contact Support: If the problem persists, consider reaching out to Aspose support for further assistance. They may have additional insights or solutions based on your specific situation.

By following these steps, you should be able to identify the cause of the “Authentication Failed” error and resolve it. If you continue to experience issues, providing detailed information about your implementation and any error messages can help in diagnosing the problem further.