Results 1 to 13 of 13

Thread: How do I ping from VB.Net

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2005
    Posts
    625

    How do I ping from VB.Net

    Hi, I know this is probably a dumb question, but I just want to do a simple
    ping from my application and store the result. I looked in System.Net and
    can't seem to find an object or method. Can someone help me?

    Thanks!

  2. #2
    Member
    Join Date
    Jun 2005
    Posts
    57

    Re: How do I ping from VB.Net

    I am also looking for an answer to this question...thanks

  3. #3
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: How do I ping from VB.Net

    I found this for both of you

    http://www.dart.com/pingdotnet.asp

  4. #4
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: How do I ping from VB.Net

    I found this for both of you.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  5. #5
    Hyperactive Member
    Join Date
    Oct 2004
    Posts
    263

    Re: How do I ping from VB.Net

    I realize this is 3 years old, but it is the first thing that google turned up, so I thought I'd add what I found. This seems like the way to go:

    Code:
    If My.Computer.Network.Ping("192.168.0.152") Then
                MsgBox("success")
            Else
                MsgBox("no reply")
            End If
    Dave

  6. #6
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: How do I ping from VB.Net

    When I put my own IP address into Whoisxy, it came back with "Bad host name or IP address" and I know that isn't true.

  7. #7
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: How do I ping from VB.Net

    @dogboy - why are you wanting to ping?
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  8. #8
    Fanatic Member
    Join Date
    Nov 2007
    Posts
    520

    Re: How do I ping from VB.Net

    Quote Originally Posted by dbasnett View Post
    @dogboy - why are you wanting to ping?
    you do realize this post is like..5 years old right?

    Regardless, Pinging is used for multiple reasons.

    1. If you are using proxies, you want to make sure it has low latency so it doesnt lag your software tremendously.

    2. To make sure a net service is..ONLINE.

  9. #9
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: How do I ping from VB.Net

    Quote Originally Posted by TCarter View Post
    you do realize this post is like..5 years old right?

    Regardless, Pinging is used for multiple reasons.

    1. If you are using proxies, you want to make sure it has low latency so it doesnt lag your software tremendously.

    2. To make sure a net service is..ONLINE.
    Really? Try this test:

    1. Close your browser
    2. Get a DOS Prompt
    3. Ping www.vbforums.com

    when you get one successful reply come back to this thread and post the results.
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  10. #10

  11. #11
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,897

    Re: How do I ping from VB.Net

    all over agian
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  12. #12
    Junior Member
    Join Date
    Jun 2010
    Posts
    17

    Re: How do I ping from VB.Net

    Quote Originally Posted by dbasnett View Post
    Really? Try this test:

    1. Close your browser
    2. Get a DOS Prompt
    3. Ping www.vbforums.com

    when you get one successful reply come back to this thread and post the results.
    I know this is 5 yr old post but hey i just wanted to put my penny in on dbasnett post to make sure you get the right results :-

    Example 1
    Server is most likely up and behind firewall. (DNS to IP is working)

    Ping reply :-
    Pinging www.vbforums.com [63.236.73.220] with 32 bytes of data:
    Request timed out.

    Example 2
    Server is pingable.

    Pinging rasangroup.com [174.122.250.34] with 32 bytes of data:
    Reply from 174.122.250.34: bytes=32 time=266ms TTL=48

    Example 3
    Server is nowhere to be found. (DNS to ip cannot be resolved)

    ping ksksksksks.com
    Ping request could not find host ksksksksks.com. Please check the name and try again.

    Reason of this post? well you know what to look for if you are relying on ping reply and what different result means. I probably missed out alot of other results from ping but these are probably most common ones.
    Last edited by megatrontheman; Jul 6th, 2010 at 03:50 AM.

  13. #13
    Frenzied Member
    Join Date
    Jul 2011
    Location
    UK
    Posts
    1,335

    Re: How do I ping from VB.Net

    EDIT ....oops wrong thread, many apologies

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width