Simple Registration Framework
  This project provides simple tools, which add a "shareware like" registration support to .NET application. Registration is assured through registration token (XML file), which has to be present together with application - so it is off-line registration scheme. I've created it for one of my applications, but it is general and can be easily leveraged  in other projects.

The registration framework is based on XML signatures and uses  System.Security.Cryptography.Xml assembly.  Registration tokens are created as XML signed documents, which contain user details, registration type, expiration, etc.  The application contains public key (compiled into application IL code) and can easily check validity of the registration token. Breaking this registration scheme requires modification of application IL code - either to eliminate registration checking functions or to replace public key with false one and then create also false registration token.

This simple framework consists of library,  Winforms tool and test application:

Library (RegistrationSDK) contains these three main classes:

  • RegInfo - contains registration info, object representation of registration token
  • RegCreator - creates signed XML registration token
  • RegValidator - checks signed XML validation token

Winforms tool (Registration manager) manages registration, it uses MS JET database to maintain two tables - application and registrations (licenses). It enables to:

  • create key pair for application (and copy it as code declaration for inclusion into application code); also this info is stored in table
  • create signed XML registration token for given application (and enables to save or copy XML token); also all registrations are stored in table

Test application (TestApp) demonstrates usage of framework in an application.

Source code for this simple framework can be downloaded here. It is provided under GPL license.

Last site update on 30/08/2013