views:

549

answers:

3

We have a suite of products that are all built on the Microsoft ASP.NET platform. The products run on a common platform (set of services) and each product is highly modularized (basically in the UI layer, features/modules can be turned on or off). A given site may license the platform and 2 modules but not the other 5. Right now we manage this with configuration, however the configuration process is very touchy, error prone and not at all secure.

We are looking for a comprehensive solution to licensing our ASP.NET applications where we can turn on and off features by simply adding/updating a product key. We are looking for something that will also support time based or # of uses constraints on the product keys. I have seen lots of solutions out there for WinForms but very little that are targeted towards ASP.NET web applications.

Any suggestions from the community on best practices, tools, products, patterns you have used to accomplish this in your shops would be greatly appreciated.

A: 

Have a XML file Key Value pair denoting your constraints. On Application_Load read this file and set your constraints. Store the Hash of this file + a SALT (which you change with EVERY release) as the product key.

<LICENSE>
<NUM_OF_USERS>7</NUM_OF_USERS>
<FEATURE1>PRESENT</FEATURE1>
<FEATURE2>PRESENT </FEATURE2>

...
</LICENSE>

You don't even have to encrypt this file as you hash it with your salt for craeting a product key.enter code here

Mugunth Kumar
+1  A: 

If you want to do-it-yourself, check the .NET LicenseProvider. This provider and its supporting classes allow you to build your own license scheme for web apps as well as windows forms. A few articles describing .NET licensing:

If you don't need complete control, a third-party library will likely be cheaper. We used Xheo's Licensing without much trouble (obviously, there are always quirks).

Corbin March
A: 

CryptoLicensing supports upto 2040 features (bit flags). You can also add/remove features (or any other license settings) from the same license key. It alo supports time-based or usage-based limits like you want.

logicnp