License Key

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
jasonvv
Posts: 2
Joined: Tue Mar 14, 2023 2:21 pm

License Key

Post by jasonvv »

I am interested in retrieving the SoftPro serial number from the SerialNumber property. The interface ILicenseKey has the SerialNumber property but I am unsure how to call it. The GetService method does not appear to support ILicenseKey. This might be more of a C# question than an API question but hoping for a hint. Thanks!
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: License Key

Post by BobRichards »

The ILicensing service may only available on the server service provider - I don't remember.

However the code below will get the serial number for the first license it finds. All the licenses should have the same number.

Code: Select all

public GetLicenseKeys(SelectServer ss)
{
    var licMgr = ss.GetService<ILicensing>();
    string serialNumber = licMgr.Keys.FirstOrDefault().SerialNumber;
}
Bob Richards, Senior Software Developer, SoftPro
jasonvv
Posts: 2
Joined: Tue Mar 14, 2023 2:21 pm

Re: License Key

Post by jasonvv »

That worked! Thank you very much.
Post Reply