≈ the.bay.news

Licensing a .NET app on Linux and macOS

DEV Community
Licensing a .NET app on Linux and macOS
Most licensing guidance is written for Windows, and the Keyright SDK quietly hides that: the same Validate() and ActivateAsync() calls work on Linux and macOS. But the three things a licensing SDK depends on — a per-user data folder, a stable machine identity, and an app that relaunches often enough to refresh its lease — all look different off Windows. The lease lands in ~/.local/share, which a sandboxed Mac app or a systemd service with ProtectHome= cannot write. The machine fingerprint anchors on /etc/machine-id or the IOPlatformUUID instead of a registry value, and a golden image that forgot to clear machine-id makes a whole fleet one machine. And a daemon that starts once a quarter never gets the startup refresh a desktop app relies on, so its 14-day lease expires with the process still running. This post walks through where the SDK writes on each platform, what the fingerprint is built from and the two machine-id traps, a systemd unit with StateDirectory= and LoadCredential= that gives the SDK a home, the lease-refresh loop a long-running service needs, the file mode the lease deserves on a multi-user host, and the verification loop that proves it.

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.