How can I know which machines are alive on the same LAN as my PC using ASP.NET?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can ping the computers on the network.
http://msdn.microsoft.com/en-us/library/system.net.networkinformation.ping.aspx
You can use this ping code and iterate through the IP addresses on your LAN (
for(i = 1; i < 255; i++)). You should probably read up on doing IP address calculations though:http://blogs.msdn.com/knom/archive/2008/12/31/ip-address-calculations-with-c-subnetmasks-networks.aspx
This is called a ‘ping sweep’. It does assume that the computers on the network have not been configured to ignore ICMP requests.