ThinkSharp.Licensing icon indicating copy to clipboard operation
ThinkSharp.Licensing copied to clipboard

How to generate license file without hardware from Server and when validating on Client add Hardware string ?

Open LightWeight-POS opened this issue 1 year ago • 1 comments

I will generate license files from my computer and then supply the license file in exported file to customer.

I won't have the hardware details of client machine and I would like to know how can I run below command when validating for the first time and then add to license which gets saved in database ?

.WithHardwareIdentifier(HardwareIdentifier.ForCurrentComputer())

LightWeight-POS avatar May 01 '24 04:05 LightWeight-POS

It is not possible to extend an existing licence, because it would change the license's signature.

If you dont want to include the hardware identifier, you can just create a licence using .WithoutHardwareIdentifier(). Otherwise, you have to get the hardware identifier before creating the licence.

If you want to use the hardware identifier, you could use the following mechanism:

  1. You generate and provide a serial number to the user (store it also in the database of your server)
  2. The user enteres the serial number in your application
  3. Your application sends a "licence request" with all relevant information (hardware identifier and serial number) to your server.
  4. The server stores the request in the database and sends a valid license back to your application
  5. Your application stores the licence locally and activates the "premium features" (or what ever)

Does that answer your question?

JanDotNet avatar May 07 '24 18:05 JanDotNet