Not all users have internet access when activating software. Air-gapped systems, secure networks, and offline environments require a different activation approach. Quick License Manager (QLM) supports offline activation out of the box.
The Problem with Online-Only Activation
Online activation requires an active internet connection, access to a license server, and real-time validation. This fails for military and government systems, industrial control systems, healthcare devices (HIPAA compliance), secure research facilities, and remote locations without connectivity.
How Offline Activation Works
The offline activation workflow is simple:
- User gets Computer ID from your application
- User visits activation portal (on a different connected computer)
- Portal generates Computer Key bound to that Computer ID
- User enters Computer Key back into your application
- Application validates offline using the Computer Key
No internet required on the target machine!
Get Computer ID
First, display the Computer ID to the user:
using System;
using QLM.LicenseLib;
class Program
{
static void Main(string[] args)
{
var lv = new LicenseValidator("settings.xml");
string computerID = string.Empty;
lv.QlmLicenseObject.GetComputerID(
ELicenseBinding.ComputerName,
ref computerID
);
Console.WriteLine("=== OFFLINE ACTIVATION ===");
Console.WriteLine($"Computer ID: {computerID}");
Console.WriteLine("\nTo activate:");
Console.WriteLine("1. Visit: https://yourcompany.com/activate");
Console.WriteLine("2. Enter your activation key");
Console.WriteLine("3. Enter this Computer ID");
Console.WriteLine("4. Copy the Computer Key you receive");
Console.WriteLine("5. Enter it below");
Console.Write("\nEnter Computer Key: ");
string computerKey = Console.ReadLine();
ValidateOfflineLicense(lv, computerID, computerKey);
}
static void ValidateOfflineLicense(LicenseValidator lv,
string computerID, string computerKey)
{
string activationKey = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX";
bool needsActivation = false;
string errorMsg = string.Empty;
bool isValid = lv.QlmLicenseObject.ValidateLicense(
activationKey,
computerKey,
ref computerID,
ELicenseBinding.ComputerName,
ref needsActivation,
ref errorMsg
);
if (isValid)
{
lv.QlmLicenseObject.StoreKeys(activationKey, computerKey);
Console.WriteLine("✓ License activated successfully!");
}
else
{
Console.WriteLine($"✗ Activation failed: {errorMsg}");
}
}
}
Windows Forms Dialog
Show a user-friendly activation dialog:
using System;
using System.Windows.Forms;
using QLM.LicenseLib;
public class OfflineActivationForm : Form
{
private TextBox txtComputerID;
private TextBox txtActivationKey;
private TextBox txtComputerKey;
private Button btnActivate;
private LicenseValidator lv;
public OfflineActivationForm()
{
Text = "Offline Activation";
Width = 500;
Height = 300;
lv = new LicenseValidator("settings.xml");
var lblInfo = new Label
{
Text = "No internet connection detected.\n" +
"Please use offline activation:",
AutoSize = true,
Top = 20,
Left = 20
};
var lblComputerID = new Label
{
Text = "Computer ID:",
Top = 60,
Left = 20,
Width = 100
};
txtComputerID = new TextBox
{
Top = 60,
Left = 130,
Width = 320,
ReadOnly = true
};
string computerID = string.Empty;
lv.QlmLicenseObject.GetComputerID(
ELicenseBinding.ComputerName,
ref computerID
);
txtComputerID.Text = computerID;
var lblActivationKey = new Label
{
Text = "Activation Key:",
Top = 100,
Left = 20,
Width = 100
};
txtActivationKey = new TextBox
{
Top = 100,
Left = 130,
Width = 320
};
var lblComputerKey = new Label
{
Text = "Computer Key:",
Top = 140,
Left = 20,
Width = 100
};
txtComputerKey = new TextBox
{
Top = 140,
Left = 130,
Width = 320
};
btnActivate = new Button
{
Text = "Activate",
Top = 180,
Left = 130,
Width = 100
};
btnActivate.Click += BtnActivate_Click;
var lblInstructions = new Label
{
Text = "Visit https://yourcompany.com/activate to get Computer Key",
AutoSize = true,
Top = 220,
Left = 20
};
Controls.Add(lblInfo);
Controls.Add(lblComputerID);
Controls.Add(txtComputerID);
Controls.Add(lblActivationKey);
Controls.Add(txtActivationKey);
Controls.Add(lblComputerKey);
Controls.Add(txtComputerKey);
Controls.Add(btnActivate);
Controls.Add(lblInstructions);
}
private void BtnActivate_Click(object sender, EventArgs e)
{
string computerID = txtComputerID.Text;
string activationKey = txtActivationKey.Text;
string computerKey = txtComputerKey.Text;
bool needsActivation = false;
string errorMsg = string.Empty;
bool isValid = lv.QlmLicenseObject.ValidateLicense(
activationKey,
computerKey,
ref computerID,
ELicenseBinding.ComputerName,
ref needsActivation,
ref errorMsg
);
if (isValid)
{
lv.QlmLicenseObject.StoreKeys(activationKey, computerKey);
MessageBox.Show("License activated successfully!",
"Success", MessageBoxButtons.OK,
MessageBoxIcon.Information);
Close();
}
else
{
MessageBox.Show($"Activation failed:\n{errorMsg}",
"Error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
}
}
The Self-Service Portal
QLM includes a built-in Self-Help Customer Site that generates Computer Keys automatically. The user workflow is straightforward: visit the portal, enter the Activation Key and Computer ID, click Activate, and receive the Computer Key instantly. No manual intervention needed. The portal validates the Activation Key, checks activation limits, and generates the Computer Key on the spot.
Best Practices
For security, the Computer ID should be unique and stable. Use ELicenseBinding.ComputerName for most cases, or consider ELicenseBinding.MacAddress for hardware binding.
For user experience, show clear step-by-step instructions, provide the portal URL prominently, add a "Copy to Clipboard" button for the Computer ID, and validate the format before submission.
For testing, verify the solution on a disconnected machine, check that Computer ID remains stable after reboot, test activation limit enforcement, and review error messages for clarity.
Platform Support
- Windows: .NET Framework 2.x/4.x, .NET 6/7/8/9/10
- Cross-platform: .NET 6/7/8/9/10, macOS, Linux
- Mobile: Android, iOS (.NET MAUI, Xamarin)
Learn More
QLM Documentation:
Quick License Manager:
Pricing (per developer/administrator):
- QLM Express: $200/year
- QLM Professional: $699/year
- QLM Enterprise: $999/year
Offline activation solves the air-gap problem elegantly. Users can activate without internet, and you maintain full license control. Implement offline licensing with Quick License Manager by Soraco Technologies.
Top comments (0)