Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have more than one machine in a place. Here we cant implement IP. We have to do with Client Machine ID or Name. So How I can get Client machine ID?

I want to maintain machine based login systems. i have a inventory product. There I need machine based login systems. Like,- If Admin tells that a Person Mr.A can login from Machine no 10 . Then he can login from machine no 10 not from other machine.
Posted
Updated 17-Apr-11 7:42am
v2
Comments
Sergey Alexandrovich Kryukov 17-Apr-11 12:03pm    
Not clear. What are you trying to achieve? Close to the ultimate goal, please.
--SA
Albin Abel 17-Apr-11 12:39pm    
What you are trying to achieve? any PC connected in network will be having an ip. We can guess your machine ip is not a static. But wrong guesses are costlier. So better provide more information.
Prasanta_Prince 17-Apr-11 13:40pm    
I want to maintain machine based login systems. i have a inventory product. There I need machine based login systems. Like,- If Admin tells that a Person Mr.A can login from Machine no 10 . Then he can login from machine no 10 not from other machine.
Tech Code Freak 7-Aug-11 11:38am    
Nice use---5up!

check this link it will help

link[^]
 
Share this answer
 
Comments
Prasanta_Prince 6-Jun-11 3:06am    
Thanks corol1234 ... it works for me..
Tech Code Freak 7-Aug-11 11:40am    
5up!
C#
String strHostName = "";
            strHostName = Dns.GetHostName();
            MessageBox.Show(strHostName.ToString());
            IPHostEntry ipEntry = Dns.GetHostEntry(strHostName);
            IPAddress[] addr = ipEntry.AddressList;

            for (int i = 0; i < addr.Length; i++)
            {
                MessageBox.Show(addr[i].ToString());
            }
 
Share this answer
 
Comments
Tech Code Freak 7-Aug-11 11:40am    
5up!
Jan Floris Van der Wateren 23-Feb-22 4:21am    
The code above will capture the server information, and not the client information as requested in the original question.

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