We are developing an assembly that will expose a multitude of components and controls. Many of them are inherited from one another and some of them represent user controls that group some other controls on them. We need to license all major types. We created a LicenseProvider that works very well by checking the design time license and embeding the runtime license in the result assembly. The problem is that if a user uses a large number of controls a separate license for each type gets embeded in the result making the file larger than needed. Also, the process of running the license check for each type might decrease performance a little. So, my idea was this: to create a special class inside the assembly with a static constructor. This means that everytime the assembly is loaded in one app domain the static constructor will be called. I would then run the license check in the static constructor and set a static value to true or false meaning the license was good or not. Then in each type I can simply check the static value and continue or not. Then, in the end result assembly only one license, corresponding to the special class, will be embeded... Considering that all other security issues are taken care of (sigining the assembly, etc...), does this method present any danger? Can anybody think of any security issues? This assembly will be sold entirely and there will be no licenses per type, but just per the entire assembly so this approach makes sense to me... I was only wondering if anybody might think of a reason why this might not be a good idea

Thank you!
Iulia