Error activating aspose.word on test environment

Hi

we have just purchase a new license for Aspose.Word

we have registered the product in Program.cs

Snippet

Aspose.Words.License license = new Aspose.Words.License(); 
license.SetLicense("Aspose.Words.lic");

and placed the LIC file in the root of the application

all worked fine in DEV

when we deployed the app to the test environment we are getting water marks on the created documents

what did we do wrong?

thank you for your help

@dmitryl

It sounds like you’re encountering an issue with the license activation for Aspose.Words in your test environment. Here’s a structured approach to resolve the problem:

Cause: The issue may stem from the license file not being correctly located, insufficient file permissions, or differences in the environment configurations.

Solution: Follow these troubleshooting steps:

  1. License File Location: Ensure that the license file (Aspose.Words.lic) is located in the root directory of your application in the test environment. Deployment processes can sometimes alter the file structure.

  2. File Permissions: Check the permissions of the license file. The application must have read access to the file in the test environment.

  3. Code Execution: Confirm that the line of code to set the license is being executed in the test environment. Adding logging can help verify that the license is being set correctly.

  4. Environment Differences: Since it worked in the development environment, compare the configurations between the two environments. Look for differences in the .NET framework version, application settings, or any other dependencies that might affect license activation.

  5. Rebuild and Redeploy: Sometimes, simply rebuilding the application and redeploying it can resolve issues related to file access or configuration.

Next Steps: If you have checked all of the above and are still facing issues, please reach out to Aspose support with specific details about your test environment setup for further assistance.

I hope this helps you resolve the issue!

@dmitryl Please check the following points:

  • Make sure your call to SetLicense gets executed. Step through in the debugger.
  • Make sure your code does not catch an exception thrown by Aspose.Words licensing code. For example, Aspose.Words will throw if it cannot find the license.
  • Make sure the input documents do not already have the evaluation message. Aspose.Words does not delete existing evaluation messages.
  • Make sure SetLicense is executed before you instantiate any Document object.