I am looking for advice how to architect licensing for a .NET library. I am not asking for tool/service recommendations or something like that.

My library can be used in a regular desktop application, in an ASP.NET solution. And now Azure services come into play.

Currently, for desktop applications the library checks if the application and company names from the version history are the same as the names the key was generated for. In other cases the library compares hardware IDs.

Now there are problems:

  • an Azure-enabled web-application can be run on different hardware each time (AFAIK)
  • sometimes the hardware ID for the same hardware changes unexpectedly
  • checking the hardware ID or version info might not be allowed in some circumstances (shared hosting for example)

So, I am thinking about what approach I can take to architect a licensing scheme that:

  • is friendly to customers (I do not try to fight piracy, but I do want to warn the customer if he uses the library on more servers than he paid for)
  • can be used when there is no internet connection
  • can be used on shared hosting

What would you recommend?

  • The simple solution would be to activate/deactive specific hardware. Think iTunes where you can authorize certain computers. This will allow you to authorize a computer then pull the plug if you wanted. Why are you going to support "no internet connection" if you do that then you have no way of knowing how many computers the license is being used on, and thus cannot warn the user, they are using to many instances.
    – Ramhound
    Nov 28, 2012 at 14:33
  • I believe the requirements stay opposite together. To have a licensing for the cloud, where you want to be independent from the hardware, needs some sort of a central checkpoint, which must be at least some LAN, if not the internet.
    – Marcel
    Feb 15, 2013 at 18:56
  • @Marcel thank you. I agree with your and Ramhound's suggestions but I just can't understand what can be checked in case of cloud scenario (multiple hardware configurations) / shared hosting (with probably no rights to check hardware at all).
    – Bobrovsky
    Feb 16, 2013 at 4:44
  • @Bobrovsky You can check periodically against a secret (an api key for example) and make sure that the source of the check request is on just one source at a time. You can check this by looking at the IP address the request comes from.
    – Marcel
    Feb 16, 2013 at 21:32

1 Answer 1


It's not perfect, but here's what I would do. I would send a message somewhere to one of your servers each time a new hardware ID pops up. You'd keep track of how many hardware IDs each user has. If they're registered for 5 servers, but there appears to have been 20 hardware IDs used in the past hour, that's a bit suspicious. Email them and warn them that they might be using this outside of the terms of the license.

Note: this in NO way to fight piracy. This is to provide a system so you can ensure your client know if they are possibly going outside of their license (it sounds like you're marketing to businesses, which typically really care about this and lawsuits)

  • Thank you. We are really marketing to business and the point is to make customer aware about possible violation of licensing terms.
    – Bobrovsky
    Feb 23, 2013 at 13:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.