This is one of those small projects that look easy at first but tend to become extremely complex depending on ambition level.
There are some factors to consider before doing such a solution
one of the biggest topics is security, how well do you want to protect your license handling encrypted files/database/communication?
should the license handling allow for individual features to be turned on/off for individual clients?
do you want to store the license information in the database or should you just generate valid keys using some algorithm and then check the key when user connects?
what approach to use when the license server is offline, nerve the client with popups? don't start? allow for it to run normally and only check license once a week?
and so on.
One approache I've seen which seem to work pretty well was to have license files, these are encrypted but contain one or more mac addresses of the client. They are not sent to each client, instead they are entered into the server (some window service,webservice etc). When the client starts up it connects to this central license server. The mac address of the client is compared to registered clients. If the license key is invalid, every X minutes a popup is shown on the screen saying that the client is running on a temp. license and that he please should get a permanent license. If no permanent license has been obtained withinr 30 days the client will not startup. (This method can be used for sending out demo clients as well)