Click here to Skip to main content
15,889,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
<big></big><big></big>
hi please tell me how create scurity code in c#.net
to use program from one person and one computer(scurity code)
when use this program another person error display or serialno you need
Posted

1 solution

you can use
C#
System.DateTime.Now.Ticks
to generate a long value and use that as a serial key. Generate it uniquely for every user and store in DB so that no single serial key can be used on 2 different apps. You can even XOR it to a prime number to make it more random and unpredictable for securing it. In the days of VB6, i used to achieve this using
VB
FileSystemObject 
class which was used to get the serial number of the hard drive of a computer and used that as a serial key. So if someone tried to use the app on a different computer, it wouldn't work because the hard disk is different. You can try finding similar thing in C#, i m sure it must be there. All you need is a bit of imagination to achieve what you want to achieve.

Hope this helps.

Cheers
 
Share this answer
 

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