License Key
Moderator: Phil Barton
License Key
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!
-
- Posts: 1382
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: License Key
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.
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
Re: License Key
That worked! Thank you very much.