Include Aspose.Words License File as an Embedded Resource in Visual Studio & Set License | Prevent Evaluation Mode

Hi Team,

We are using Aspose.Word licence to generate report in our application. From last one month, we are getting issue while generating and the report and text display as below:
"Evaluation Only. Created with Aspose.Words. Copyright 2003-2011 Aspose Pty Ltd." and " This document was truncated here because it was created using Aspose.Words in Evaluation Mode."

We understood its the problem with the license and we have got new license. But still although after applying new license, we are ended up with the same issue.

Please help us in resolving the same.

Thanks
Suvarchala

@tenaliSuvy,

Please make sure that your are successfully making a call to License.SetLicense Method before instantiating a Document object. Also, please refer to the following article:

In case the problem still remains, then please post your new license file ‘via private message’. In order to send a private message with attachment, please click on my name and find “Message” button.

How to apply Aspose.Words License?

We will then investigate the issue with your new license file on our end and provide you more information.

Hi Hafeez,

The same license file is working in lower Environment i.e., Test and in our local code. But in our production environment, it is not working and showing the same issue.

Please help us in resolving the issue.

Thanks
Suvarchala

@tenaliSuvy,

Please make sure that you are passing correct path to .lic file in SetLicense method and your application has permissions to access the directory where you have placed the .lic file. Are you suppressing exceptions using try-catch blocks in your code? Aspose.Words will throw exception if it is unable to locate the .lic file on server.

A neat way of packaging the license with your application and making sure it will not be lost, is to include it as an embedded resource into one of the assemblies that calls Aspose.Words. To include the file as an embedded resource, perform the following steps:

  1. In Visual Studio, include the .lic file into the project using the File | Add Existing Item… menu.
  2. Select the file in the Solution Explorer and set Build Action to Embedded Resource in the Properties window.
  3. In your code, invoke License.SetLicense passing only the short name of the resource file