-2

I have created an application in WPF C# and obfuscated through Dotfuscator. Now I wish to give License key for my vendors. There are Four Menu's in my application and each Menu have separate cost. So I need to give separate license key for each Menu's to verify it.

I have searched in Google but it shows a single license key for the entire application only. Can anyone please send some links or ideas.

Arun
  • 728
  • 4
  • 16
  • 30

2 Answers2

1

What you're talking about is usually referred to as "feature licensing", where you license individual features of your application, as opposed to all features with a single license. Each user would have a certain set of licenses associated with their user account; the set of licenses would be dependent upon which features they've purchased from you.

Within your code, upon login, you could validate each of a user's licenses to determine which features they're allowed to and not allowed to use. For example, here's some pseudo-code:

features = {
  FEATURE_X: false,
  FEATURE_Y: false,
  FEATURE_Z: false
}

for license in licenses
  switch license.policy
  case 'FEATURE_X'
    features.FEATURE_X = license.is_valid()
  case 'FEATURE_Y'
    features.FEATURE_Y = license.is_valid()
  case 'FEATURE_Z'
    features.FEATURE_Y = license.is_valid()

# Later in your software:

if features.FEATURE_X
  # … let the user do X
else
  # … don't let them

I built a software licensing API that makes this type of license model a lot easier to manage than it has been in the past. Using my service, Keygen, you can create different license types (policies) which represent your individual features, e.g. "Feature X", "Menu Item Y", etc.

Keygen also provides user management features, so associating multiple licenses with a single user, like for this particular licensing model, is a breeze.

ezekg
  • 924
  • 10
  • 20
0

What you are talking about isn't default behaviour for any application so you wont find an out of the box solution.

The modern way of doing something like this would be Account based, you have a User Account that records what the user has purchased then your app connects to your server and downloads its active permissions.

you would then use the Licence Keys to ensure that each account is not using more copies of the application than they have Licence keys

MikeT
  • 5,398
  • 3
  • 27
  • 43