Bluebit Software
Bluebit Software Support Forum
 Home          Members     Calendar     Who's On

Welcome Guest ( Login | Register )
        



Developer's License with unsigned assemblies Expand / Collapse
Message
Posted Wednesday, March 02, 2005 8:12 AM Post #45
 

Bluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit SupportBluebit Support

Introduction

The purpose of this topic is to demonstrate how to use .NET Matrix Library with a Developer's license without signing the main application.

.NET Matrix Library is offered in two kinds of commercial licenses: Single Machine License and Developer's License. Developer's License offers royalty free redistribution rights, it is not bound to a specific machine, it does not require any kind of registration or activation. Copying a *.LIC in the application's folder is the only thing that is required to have the application licensed to use NML.

To sign or not to sign

The only limitation of a Developer's License is that it requires that the assembly using NML has to be signed. The licensing mechanism compares the public key token of the calling assembly with this stored in the license file and verifies the legal use of NML. For most developers and software companies, signing their code is a common practice and intergrading a developer's license of NML is just as simple as copying the *.LIC license file in the application folder.

There are cases though, where an application is used only internally within an organization and signing assemblies has not the same importance as when an application is distributed globally from a developer or a software house. We have met the situation where an organization had a collection of previously built unsigned assemblies that need to be used together with NML.

The question here is: Can we mix signed and unsigned assemblies? Well, yes and no. The following table describes the situation:

 Can be referenced by Can reference
An unsigned assemblyUnsigned assemblies onlyEither signed or unsigned
A signed assemblyEither signed or unsigned assemblies Signed only
.NET Matrix Library used with a trial or a single machine licenseEither signed or unsigned assemblies  
NET Matrix Library used with a developer's licenseSigned assemblies only  

This looks like a deadlock situation. Signing the application that is to use NML makes impossible to use other unsigned assemblies. Not signing the application makes impossible to use NML with a developer's license.

The Solution

As we can see from the previous table, an unsigned assembly can reference either signed or unsigned assemblies. Instead of directly referencing NML from our application, we may create a signed class that will reference NML and then have our main (unsigned) application to use the NML's functionality through this (signed) class.

Sample code

In order to demonstrate the above, we have created a solution that combines two projects.

UnsignedApp is our unsigned main application that needs to use NML. It doesn't do this directly but through the use of the SignedDLL. At the same time, UsignedApp being unsigned, it can reference other unsigned assemblies too.

SignedDLL is the part of our code that is signed with our private-public key pair created by the sn utility. Being a signed assembly, it can use NML with a Developer's License and at the same time expose public methods that will be used by the UnsignedApp.

You can download the sample code from here: http://www.bluebit.gr/code/CodeSample1.ZIP


Trifon Triantafillidis

Lead Developer

Bluebit Software

« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Trifon

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 6:25am

Powered by InstantForum.NET v4.1.4 © 2012
Execution: 0.234. 7 queries. Compression Disabled.
.NET Matrix Library