Free Support Forum -

Set license makes WCF service unresponsive


we have 2 windows 2008 production servers under NLB .

on each one we have :
6 web applications using ASPOSE.WORDS
3 WCF services using ASPOSE…WORDS

After some time of running all those application , we are getting an error from SetLicense - null object reference exception and WCF services became unresponsive.

after IIS reset everything became working again and at some point the problem returns .

In wcf service we have a class , not static , witch has a setlicense code in its constructor .
licence file is attached to project as embedded resource .

What could be the problem ?
too many applications using aspose on same machine / domain ?
other problem regarding setlicense code ?
We were unable to reproduce the problem in test application .

Best regards & waiting for your support .

Hi Luiza,

Thanks for your request. The problem might occur because you are setting the license multiple times in multiple threads. The older versions of Aspose.Words have a problems with such scenario. The problem was fixed few releases ago so now it is safe to set license in multiple threads. However, it is still not recommended. It is better to set license only once per application domain.

Best regards,

we have

Is this problem known in this version ?


Thanks for your inquiry. Yes, this version has the problem with setting a license in multiple threads. The problem was fixed in 9.8.0 version. You can download it from here:

Best regards,

if I will create a static class which has only setlicense code , but I will use aspose from other classes it will be enough ?

Hi Luiza,

Thanks for your inquiry. Yes, I think, it would be enough. Please follow the link to learn when to apply the license:

Best regards,