Select to view content in your preferred language

Best place to perform license check (enforce NON-Esri licensing) at Add-In startup?

487
4
Jump to solution
08-29-2024 11:28 AM
coryeicher
Frequent Contributor

Hi Everyone

We have an ArcGIS Pro SDK Add-In for which we are implementing our own licensing. This is to license our add-in, and it is separate from licensing ArcGIS Pro.

1. Is this the recommended approach for "enforcing" a license before during Add In?

https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Configurations#onvalidatelicense

2. This recommendation would have us implementing a Configuration a) instead of, or b) in addition to our Add In. Which is recommended? Has anyone here implemented a) or b) successfully?

3. What alternate approaches are recommended for enforcing an Add-In license at start-up? Are there simpler approaches than implementing a Configuration?

Thanks!

-Cory

 

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Have you seen ArcGIS Pro SDK Community Licensing sample? It works with add-in. It would be like external ArcGIS Pro extension license.

 

GKmieliauskas_1-1724957534096.png

 

View solution in original post

0 Kudos
4 Replies
GKmieliauskas
Esri Regular Contributor

Have you seen ArcGIS Pro SDK Community Licensing sample? It works with add-in. It would be like external ArcGIS Pro extension license.

 

GKmieliauskas_1-1724957534096.png

 

0 Kudos
coryeicher
Frequent Contributor

Thank you. We are looking into this one since it does seem like a better fit for our existing Add-In. Will report back.

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
0 Kudos
coryeicher
Frequent Contributor

Hi @GKmieliauskas 

Thank you. This one worked perfectly for our scenario.

"ArcGIS Pro SDK Community Licensing sample"

 

Best

-Cory

CORY EICHER
www.eichcorp.com
cory@eichcorp.com
0 Kudos
RichardDaniels
Frequent Contributor
For effective licensing you would need to provide a license key file to each customer. This key file would be placed at a well known location to your add-in. On startup of the add-in the file would be read, if missing or invalid go into demonstration mode; If found read the key and validate (e.g., the most effective would be to send to a web server (as an API call) to validate the key exists and has not expired). The key would need to be encrypted. You could also place a date in the key file to allow timeout after D days, M months, or Y years.
Main idea is you will need a way to validate the key exists and is valid. You can add additional verification checks by having your customer provide a user name and/or a domain name were the license will be considered valid when they make the purchase. See: System.DirectoryServices.ActiveDirectory<> for domain or string userName = Environment.UserName for user name.
0 Kudos