.net - How to add limited time and functionality for C# application? -
i have desktop c# application, best way add these functionalities:
- limited time after app needs reinstall?
- limited privileges? (each user have different access functions of software)
i want these options without login or server accessibility. want library or dll.
it can done , hard @ same time.
why can done? can write time of first launch \ installation in text file / registry / somewhere else, , check on every launch.
however, not rely on approach since experienced user can "reset" limitation deleting / modifying file / registry key.
if application commercial, means (often, huge) loss of money.
recall how different commercial applications provide trial functionality (ms windows, ms office, adobe photoshop etc.) , recall how cracked 300 kb application :)if want make safe, need use generated , expirable license keys - better license server, since offline keys generation / validation algorithm can hacked well.
you cannot implement role-based system without login / computer / other identification, because need differentiate users. way implement different applications different roles.
priviliges / roles etc. without server means hard-coded priviliges, , that's bad.
can create resource file information administrator , simple user (for two-role system, instance).then, in code, implement logics based on roles:
if (session.user.isadministrator) // own-written classes, of course buttonremoveuser.show();
it can done in way better approach using role providers etc., you.
however, these users , roles can cracked through decompiler / resource viewer. also, if user credentials become compromised, cannot block user or change password.
proper solution use server authentication.
you want create system functionality, requires client-server architecture.
think twice before trying implement offline application.
if possible , secure, why people use servers @ all?
Comments
Post a Comment