Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to know which computer is using my application.
that is i have a delete option in my application and i want to know that "if any one has deleted the data from my application from any other system then its ip address or some unique id should be captured".I know that ip address is not unique across the world then what i should capture to know which computer has used my application.
Posted

1 solution

Try and use macaddress of the system.

C#
public static PhysicalAddress GetMacAddress()
         {
         foreach (NetworkInterface nic in NetworkInterface.GetAllNetworkInterfaces())
             {
             // Only consider Ethernet network interfaces
             if (nic.NetworkInterfaceType == NetworkInterfaceType.Ethernet &&
                 nic.OperationalStatus == OperationalStatus.Up)
                 {
                 return nic.GetPhysicalAddress();
                 }
             }
         return null;
         }
 
Share this answer
 
Comments
Member 8388026 7-Jan-14 6:51am    
ya after getting the PhysicalAddress then how can i trace that computer...
ravikhoda 7-Jan-14 7:29am    
best way is to store the mac address in the data base and set some flag to true or false based on your logic. like


ID - Mac address - DataFlag

1 - abc - 1 (for delete)
2 - xyz - 0 (not delete)

or tell me what other requirement you have ?
Usha Sanjee 20-Jun-14 2:59am    
it giving me the mac address of my system not the client

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