|
-
Jan 6th, 2009, 10:08 AM
#1
Thread Starter
Member
[RESOLVED] Sending ping?
I'm making a roll call program with C# and I want to use my program on a computer that will sends pings every computers' IP address that that I want. I can send ping some computers but others don't work. I can't send ping every computers. Could you please help me with it?
Thank in advance.
-
Jan 6th, 2009, 10:13 AM
#2
Re: Sending ping?
Welcome to VBForums.
So you're saying you can ping certain computers but not all? Could you show us how you are pinging them?
-
Jan 6th, 2009, 10:14 AM
#3
Thread Starter
Member
Re: Sending ping?
Here you are
Code:
string address;
address = textBox1.Text;
Ping p = new Ping();
PingReply reply = p.Send(address);
if (reply.Status == IPStatus.Success)
{
textBox2.Text = System.Net.Dns.GetHostByAddress(address).HostName.ToString();
MessageBox.Show("");
}
else
MessageBox.Show("Nooooooooo!");
Last edited by Sokka93; Jan 6th, 2009 at 10:54 AM.
-
Jan 6th, 2009, 10:50 AM
#4
Re: Sending ping?
Your code seems to work fine, apart from the second line. You're using a variable 'adres' while you've declared 'address'.
There are a lot of reasons why a ping request isn't answered.
It could be send to a router that blocks ping requests.
Firewalls (either hardware or software) can also block ping requests.
I code C#....

-
Jan 6th, 2009, 10:55 AM
#5
Thread Starter
Member
Re: Sending ping?
Thank you.
-
Jan 6th, 2009, 11:33 AM
#6
Re: Sending ping?
So your problem is solved now?
-
Jan 7th, 2009, 02:53 AM
#7
Thread Starter
Member
-
Jan 7th, 2009, 02:55 AM
#8
Re: Sending ping?
Then could you please mark you thread resolved by using the Thread Tools menu that you can find at the top of the thread?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|