ThinkSharp.Licensing
ThinkSharp.Licensing copied to clipboard
How to generate license file without hardware from Server and when validating on Client add Hardware string ?
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())
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:
- You generate and provide a serial number to the user (store it also in the database of your server)
- The user enteres the serial number in your application
- Your application sends a "licence request" with all relevant information (hardware identifier and serial number) to your server.
- The server stores the request in the database and sends a valid license back to your application
- Your application stores the licence locally and activates the "premium features" (or what ever)
Does that answer your question?