SyncfusionLicenseProvider.RegisterLicense() fails silently for bad licenses

Is there a way to validate that a provided license is valid at runtime?  Using Syncfusion.Pdf.Net.Core 18.2.0.44 the call to Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense() fails silently for invalid licenses, and results in a watermark being placed on PDF's.  I would like to be able to stop forcefully stop the application if the license provided is invalid.  

11 Replies

KJ Kalap Johnson Peter Paulraj Syncfusion Team August 14, 2020 01:57 PM UTC

Hi Lincoln, 
 
Thanks for contacting Syncfusion support. 
 
Please find below the response for your queries. 
 
Q1) Is there a way to validate that a provided license is valid at runtime?  Using Syncfusion.Pdf.Net.Core 18.2.0.44 the call to Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense() fails silently for invalid licenses, and results in a watermark being placed on PDF's. 
 
A1) Already we are validating the registered license key in your application. Below code will validate whether the given license key is valid or invalid at run time of your application.  
 
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense(“license key”); 
 
If you are using Syncfusion NuGet packages from nuget.org or trial installer, you should generate and register corresponding version and platform license key in your application to prevent the trial water mark. Our license keys are version and platform specific. Refer the following documentation link to know more about licensing. 

https://help.syncfusion.com/common/essential-studio/licensing/license-key  
 
 
Also ensure that all the referenced Syncfusion assemblies\NuGet packages are on same version.  
 
Find below the knowledge base article to know about which version license key should use in application, 
 
 
Q2) I would like to be able to stop forcefully stop the application if the license provided is invalid. 
 
A2) Mainly we are using this license key to prevent using our products inadvertently. As of now we don’t have support for stopping the application if invalid license provided 
 
Let us know if you need further assistance on this. 
 
Regards, 
Kalap Johnson Peter P.


LW Lincoln Waddell August 14, 2020 02:57 PM UTC

Thanks so much for the reply, Kalap.  I have to take issue with your statement "Mainly we use this license key to prevent using our products inadvertently."  Since your license keys are tied to the NuGet version, it's very easy to upgrade the NuGet package without also updating the license key at the time time.  This doesn't stop the use of your product, but results in a watermark being placed on PDF's.  Ideally, the caller would have the ability to proactively check if the license key is valid, and choose what to do if it is not.  Something like SyncfusionLicenseProvider.IsValid(licenseKey) that returns a boolean.  Are there plans to add this capability in the future?


KJ Kalap Johnson Peter Paulraj Syncfusion Team August 17, 2020 11:27 AM UTC

Hi Lincoln,

Q1) Since your license keys are tied to the NuGet version, it's very easy to upgrade the NuGet package without also updating the license key at the time. This doesn't stop the use of your product, but results in a watermark being placed on PDF's

A1) You need to update the license key in your project for every major volume release only.

Upgrading to Volume release 

If you are using the application from Syncfusion version 18.2.0.* and trying to upgrade to our next volume release version 18.3.0.*, you should generate the license key for v18.3.0.* and update the key in your application. 

For example, if you are using v18.2.0.44 and trying to upgrade to next volume release v18.3.0.* you need to regenerate the licensing key for v18.3.0.* from our website and update the licensing key in your application. 

Upgrading to Service Pack\NuGet release 

Our Volume release licensing key (18.2.0.*) can be applied to its service pack\nuget releases. 

If you are using the application from Syncfusion version 18.2.0.* and trying to upgrade to its service pack\nuget release in same volume release, there is no need to regenerate the license key again. 

For example, if you are using v18.2.0.44 and trying to upgrade to its service pack\nuget release in same volume release v18.2.0.53 or v18.2.0.54 there is no need to regenerate and apply the license key again for service pack\nuget releases.

Refer the below KB article to know about which version license key should use in application,

https://www.syncfusion.com/kb/8951/which-version-syncfusion-license-key-should-i-use-in-my-application

Q2) Ideally, the caller would have the ability to proactively check if the license key is valid, and choose what to do if it is not. Something like SyncfusionLicenseProvider.IsValid(licenseKey) that returns a boolean. Are there plans to add this capability in the future?

A2) We have created an incident for this query. We will update the response for this query in that. Please follow up here for that.

Let us know if you need further assistance.

Regards,
Kalap Johnson Peter P. 



GG Gyorgy Gorog December 25, 2020 07:15 PM UTC

Hi there, I am waiting for that boolean too. Thanks! 


KJ Kalap Johnson Peter Paulraj Syncfusion Team December 28, 2020 12:10 PM UTC

Hi Gyorgy, 

We have created an incident for this query under your account. Please follow up on that incident for further updates. 

Regards, 
Kalap Johnson Peter P.


SP Spotty January 23, 2021 08:33 PM UTC

I would also like to do the same thing with checking if a license is valid.   So upvote on that one.


MA Muruganandam Alwar Syncfusion Team January 26, 2021 08:39 AM UTC

Hi Spotty, 

Please find the response to your query.   

Already we are having a method for validating the given Syncfusion license key in our Syncfusion.Licensing.dll.   

First, you have to register the license key using SyncfusionLicenseProvide.RegisterLicense(“YOUR LICENSE KEY”) in your application.    

To validate the license, you can use the below code in your application by passing the required platform as a parameter that returns the boolean value.   

bool isValid = SyncfusionLicenseProvider.ValidateLicense(“platform”);   
 

Find below the list of platform enumeration values. 
  1. ASPNET
  2. ASPNETCORE
  3. ASPNETMVC
  4. Blazor
  5. FileFormats
  6. UWP
  7. WindowsForms
  8. WPF
  9. Xamarin
 

Examples: 
 
SyncfusionLicenseProvide.RegisterLicense(“YOUR LICENSE KEY”)   
     
   
You can use this process to validate the registered license key.   
   
Let us know if you’ve any other queries. 
 
Regards, 
Muruganandam Alwar.


JM Jonathan Markevich replied to Muruganandam Alwar November 16, 2021 08:13 PM UTC

Hi Muruganandam,

What version is this available in? I don't see it in 19.3.0.47

Ah never mind, it's a static method so it doesn't show up in autocomplete, I guess.



JM Jeyaseelan M Syncfusion Team November 17, 2021 11:39 AM UTC

Hi Jonathan, 

Thanks for contacting Syncfusion support. 

This API is still available in our latest version too. But we didn’t exposed the below validation method, as it might confuse while registering the license keys. So it won’t display in the intellisense. 

You can copy\paste the below code directly to validate the license keys after registering the license key. 

bool isValid = SyncfusionLicenseProvider.ValidateLicense(“platform”);   


Example, 

SyncfusionLicenseProvide.RegisterLicense(“YOUR LICENSE KEY”); 
 
      
    

Regards, 
Jeyaseelan M


AK Aman kumar December 21, 2022 05:53 AM UTC

Capture16.PNG

Hi i am getting same error msg two times when i register key one error is gone and dark colour error msg popup not gone what i do wrong pls help.



JM Jeyaseelan M Syncfusion Team December 23, 2022 05:26 AM UTC

Hi Aman,

To discuss the reported issue, we have opened a new ticket under your syncfusion account. Please proceed from there.

Regards,
Jeyaseelan M


Loader.
Up arrow icon