https://github.com/keygen-sh/example-csharp-license-activation
An example implementation of a node-locked license activation flow using Keygen and C# .NET
https://github.com/keygen-sh/example-csharp-license-activation
csharp-licensing dotnet-licensing floating-licenses license-activation license-keys node-locked product-keys serial-keys software-licensing
Last synced: 3 months ago
JSON representation
An example implementation of a node-locked license activation flow using Keygen and C# .NET
- Host: GitHub
- URL: https://github.com/keygen-sh/example-csharp-license-activation
- Owner: keygen-sh
- License: mit
- Created: 2021-05-13T15:42:42.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-16T16:03:49.000Z (over 2 years ago)
- Last Synced: 2025-06-30T00:38:30.110Z (3 months ago)
- Topics: csharp-licensing, dotnet-licensing, floating-licenses, license-activation, license-keys, node-locked, product-keys, serial-keys, software-licensing
- Language: C#
- Homepage: https://keygen.sh
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example C# Machine Activation
This is an example of a typical machine activation flow written in C# and .NET.
You may of course choose to implement a different flow if required - this
only serves as an example implementation.## Running the example
First, install dependencies with [`dotnet`](https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet):
```
dotnet restore
```Then run the program:
```
dotnet run
```You should see log output indicating the current device was activated:
```
[INFO] [ValidateLicense] Invalid=fingerprint scope does not match any associated machines ValidationCode=FINGERPRINT_SCOPE_MISMATCH
[INFO] [ActivateDevice] DeviceId=ae09c0a5-8c59-4c11-b745-5ac994d9fcc6 LicenseId=c460da8d-1b5a-44f7-8a74-9eec429876ec
[INFO] [ValidateLicense] Valid=is valid ValidationCode=VALID
[INFO] [Main] Valid=True RecentlyActivated=True
```Subsequent runs will indicate the device is already activated:
```
[INFO] [ValidateLicense] Valid=is valid ValidationCode=VALID
[INFO] [Main] Valid=True RecentlyActivated=False
```## Questions?
Reach out at [support@keygen.sh](mailto:support@keygen.sh) if you have any
questions or concerns!