License lost in Windows Service

Hi,

We’re using Aspose.Words to convert documents to PDF in a workflow action in SharePoint. We have the license file as an embedded resource compiled in our class library which performs all interactions with Aspose.Words. In the constructor we set the license file and all is running good for a certain amount of time, then all of a sudden documents start appearing with the evaluation copy message in them. Restarting the Windows Service which runs the workflows solves the issue temporarily.

This issue occurs at several of our customers and their documents are being truncated which is unacceptable.

With every interaction with Aspose we set the license and no Exceptions are thrown that the license file is incorrect or that it can’t find it and still documents end up being truncated like this.

We tested with a small console application if setting the license file 100k times consecutively would cause any problems but there we can’t reproduce it.

Is there anyway we can fix this problem?

Thanks in advance,

Kind regards,
Steven

Hi Steven,

Thanks for your inquiry. Please make sure that License.SetLicense is pointing to the correct .lic file and the project(s) are referring the correct Aspose.Words.dll. Please also check the “SubscriptionExpiry” date in your .lic file. You can also try adding the following conditional blocks in your code to determine if the red evaluation watermark is actually because of the issue in licensing code or the input documents themselves somehow have them.

if (license.IsLicensed)
{
    // convert
}
else
{
    // log
}

Best regards,

Hi Awais,

I’m sure that License.SetLicense is pointing to the correct name. Most of the times setting the license goes good so it seems, it’s unpredictable when the evaluation text will appear. The whole system is under strict version control so we can be sure that the original documents don’t contain the evaluation text.

In the .lic file I have the following Expiry date: 20170111
Version of the Aspose.Words.dll: 15.12.0.0

We currently implemented the suggestion of the following post to prevent the documents in the production environment to be saved when it is detected that the evaluation text appears. We also log it when this occurs.

As an extra measure we restart the windows service every 30 minutes but this is an unexceptable sollution since many things in the workflows depend on this service.

Kind regards,
Steven

Hi Steven,

Thanks for the additional information. Well, from the amount of info provided it is not that easy to pinpoint the cause. We suggest recycling of the app pool and upgrade to the latest version of Aspose.Words for .NET 16.2.0 from the following link and see how it goes on your end.

Download latest version of Aspose.Words for .NET

Is there a chance we can get the simplified implementation (source code/runnable .NET application) from you along with some usage scenarios (and step by step guide) in order to reproduce this issue locally on our end?

Best regards,

Hi Awais,

Thanks I’ll see with an updated version.

It will be difficult to provide a simple runnable application. Our situation is very specific as the code is used in a custom build action for Nintex Workflow running on a SharePoint 2013 server.

When I run the code in a .Net application I can’t reproduce the issue even if I run the code thousands of times in succession.

If it’s an option for you to setup a SharePoint 2013 environment with Nintex on it then I can see to create a small sample project. If not than I can send you a simplified version of the code so that you can see how the workflow action calls the class which interacts with Aspose.

Kind regards,
Steven

Hi Steven,

Thanks for your inquiry. Yes, we can setup SharePoint 2013 server. Are you able to reproduce this issue without using Nintex Workflow 2013? Please share the simplified project to be able to reproduce this issue on our end. We will also be needing your license file that you can send separately using the method mentioned in the following article:

How to send your license file to an Aspose staff member?

Best regards,