PC Review


Reply
Thread Tools Rate Thread

Licensing of controls

 
 
roland
Guest
Posts: n/a
 
      24th Nov 2004
Greetings
I am developing a licensed component. The license is a design-time license.
However, I want to do some checks at runtime as well. Therefor, I rely on an
embedded license key at runtime.
I am using a license file, which I signed with my private key and since the
assembly is strongly named, the public key is embedded in this assembly. At
design time the license provider is then verifying the file with this public
key. Sofar so good, nothing fancy about it (except for the time I spent on
this because of the total lack of consistent documentation).

However:
The next roadblock I stumbling upon is the behavior of LC.exe, or rather
VS.2003:
When an assembly is built that is using a licensed control, the licensed key
is supposed to be embedded in that assembly.
This doesn't work with me, at least not most of the time and I don't find
the logic behind it.

When I create the [assemblyname].exe.licenses resource directly with the
License Compiler I can see that the license key is embedded in the resource.
The use of LC on its own is already a daunting exercise, because if you
follow the scant MSDN documentation, you'll get a LC0003 error (unresolved
.....), the only way I got it working is by throwing everything in one folder
(lc.exe, licensed control, licenses.licx, ...).
When I rebuild the assembly in VS, the LC is called by VS (I learned that in
one of the news groups, is this documented somewhere?) and the
[assemblyname].exe.licenses resource is re-created, but mostly empty, i.e.
without the license key.
From my trials with LC.exe, I found out that, when you get an LC0003 error,
the resource is still created and then it is identical to the resource
created by VS (empty). So it looks like that when LC is called by VS, some
error happens, this error is trapped by VS, the whole build process
continues and you end up with no embedded license key.

The other roadblock I encountered is the behaviour of the GetSavedLicenseKey
method of the LicenseContext class.
The MSDN documentation states that this method only does what it should do
if it is overridden. But it looks like that the truth is much more complex:
my experience is that it sometimes does work and sometimes not, and again I
don't find the logic in it.

In some cases the calling assembly has actually the license key embedded in
its resources (easily verifyable with Reflector) and then it happpens from
time to time that the saved license key is actually retrieved by this
method, without being overridden!

The Microsft news groups are full of questions about licensing and most end
up with no answer, or in the best case, an adhoc reply from helpful support
people. What we need is a comprehensive, consistent documentation on
licensing. After all, how can we expect that our customers can use our
products in a seamless way if we are struggling ourselves with the
basics????

Awaiting your comments (and hopefully some answers to my questions!)
Thanks in advance,
Roland



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Licensing ActiveX Controls at Runtime shawnn@gmail.com Microsoft C# .NET 0 17th Dec 2005 01:47 AM
Licensing Wizard Cannot Connect to Licensing Server Registry Joe Microsoft Windows 2000 Terminal Server Clients 1 13th Jul 2005 04:35 PM
Visual Studio 2003 Updates - Controls Licensing =?Utf-8?B?WEJ1YmxlSGVhZA==?= Microsoft Dot NET 3 11th Nov 2004 07:54 PM
Is Licensing in .NET just for controls or more? SStory Microsoft VB .NET 1 3rd Mar 2004 10:26 PM
Licensing service running but no licensing server found Jaymes Microsoft Windows 2000 Terminal Server Clients 1 11th Sep 2003 10:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:34 AM.