We have Aspose.Total for .NET license, license version 3.0, SubscriptionExpiry 20170108, Aspose.Slides.dll is at version 16.6.0.0. We also use all the other Aspose dlls for Word, Excel, etc… in a SAAS environment. We have verified that all the application instances have a valid Aspose license file. However, occasionally, powerpoint presentations being processed/saved using Aspose are getting the Aspose Evaluation watermark imposed in them. Nothing consistent so far but happening a number of times across the multi-node farm and only happening for powerpoint content. Any explanation other than missing or expired license file that might cause this to intermittently happen? contention on the license file? license file loaded more than once? Etc?
Hi Andrew,
Hi Andrew,
Hi Andrew,
Sent email to Aspose staff as requested.
Note that we realized we have paid for Priority Support and have submitted a posting in that forum to escalate the urgency of this issue. That priority support posting has id# 799123.
Hi Andrew,
The issues you have found earlier (filed as SLIDESNET-38001) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
This was a long thread and many efforts and workarounds were discussed and tried. I recall that at one point, Aspose had identified an issue in the Aspose module that had to do with initializing the license multiple times and we also coded in the license init into our AppStart routines to avoid the multiple, concurrent license setting from causing the watermark issue.
Can you provide the detail as to what scenario or defect was fixed in the Aspose logic for this issue so I can better assess if we must take the new release or if the workaround we implemented is enough (and, if the updated release requires or encourages us to change our code any further)?
Hi Andrew,
I clicked the thread link you had in your email reply and it takes me to a page that say “Forum not found”.
Can you just summarize what fixes / code changes were done in the Aspose module for this issue? Or, update the link so it will navigate me.
Hi Andrew,
I like to share that you may not access the priority support forums or private threads. For this reason your account does not have access to Priority support forum thread link. However, you can get access to the thread link by using priority support account with which you have logged issue. Please refer to following information shared by our product team that has been gathered through our investigations and discussions:
1. A few minor threading-related issues were fixed during the investigation.
2. All
methods in License class are thread-safe, but this fact doesn’t
guarantee thread safety on client side inside a block of separate
license related operations.
if (mSlidesLicense == null)
{
mSlidesLicense = new Aspose.Slides.License();
mSlidesLicense.SetLicense(licenseFile);
}if (mSlideLicense.IsLicensed) // mSlideLicense object already exists, but it’s possible that license is not set yet
{
// some code here
}
3. The classic approach to get thread safety is to put critical code inside a lock block on a static object.
lock(mLockObject)
{
if (mSlidesLicense == null)
{
mSlidesLicense = new Aspose.Slides.License();
mSlidesLicense.SetLicense(licenseFile);
}
}if (mSlidesLicense.IsLicensed) // when we get here mSlidesLicense.SetLicense method was called and won’t be called anymore
{
// some code here
}
4. Suggested
approach with static license handle actually could be an alternative as
long as you use the same license file all the time. It is not
thread-safe in its meaning – actual license object used by Aspose.Slides
internally could be set a few times by calling
tmpLicense.SetLicense(licenseFile) from multiple threads. But when you
get to ‘if (sSlideLicense.IsLicensed)’ line the license will be set for
sure, and there will be no problem that some other thread setting the
license one more time because all methods in License classes are thread-safe. But it’s better to wait for Aspose.Slides 16.12.0 release with all minor fixes applied before choosing this approach.
if (mSlideLicense == null)
{
License tmpLicense = new License();
tmpLicense.SetLicense(licenseFile);
mSlideLicense = tmpLicense;
}if (mSlideLicense.IsLicensed) // when we get here tmpLicense.SetLicense method was called and likely to be called a few more times
{
// some code here
}
5. As
it is mentioned earlier, a possible useful alternative for setting
license in threads could be setting it in a single threaded environment
before starting threads, for example in Application_Start ASP.NET Global
handler.
Many Thanks,