Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have developed a .NET dll using c#.net targeted to framework 4.0 .
Now I need to implement the licensing functionality.

I want to implement the Design time licensing feature which is nothing but during the development time in visual studio.

How to achieve this? Please do help..

Basically user is not allowed to create object from my DLL after certain period of time ...

What I have tried:

Tried with GetProcess() mecahism..But I need the code should get executed during design time ..NOT Runtime
Posted
Updated 16-Jan-18 1:54am
Comments
Kornfeld Eliyahu Peter 16-Jan-18 7:40am    
Have you read this: https://msdn.microsoft.com/en-us/library/fe8b1eh9.aspx?
P.Gnanaraj 16-Jan-18 7:41am    
Yes. I have read.
I have .NET DLL ( class library ) NOT user control/Component.
Is it possible to check Design Time in .NET DLL ?

1 solution

It's possible but of very little value. As .NET is interpreted, it's not too hard to read the IL (yes, there are some hacks that prevent apps like Reflector from doing this but they can be worked around). Once you have the IL, you have the source. There's very little you can do to prevent a determined hacker from cracking your DLL. So, how to protect your assembly? Basically, you want to lock down every entry point so all public methods will have to validate that the user has the rights to do that operation, so that means they will all have to call into the licensing manager before doing anything else. Potentially, you're going to have to do similar things with none public methods as well because .NET allows you to execute code using reflection.
 
Share this answer
 
Comments
P.Gnanaraj 17-Jan-18 0:21am    
Thanks for your reply. Read and understood.
How usually Design time licensing is implemented for .NET DLL . A simple class library . I am not talking about User control or Component here.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900