none
GetHostEntry() not working with DNS which are on other server or network RRS feed

  • Question

  •  I have GetHostEntry()  method for checking given IP or DNS host name is exist or not.

    its working with all ips and dns which are on my network but not working with ips which are not on my network 

    else is there any way to check Given Ip or DNS is exist or not.?

     
    Friday, January 5, 2018 1:33 PM

All replies

  • GetHostEntry uses the same mechanism as every other net application.  If you can "ping" the name or IP address, then GetHostEntry will find it.  If "ping" cannot find it, then the name does not exist.

    There is no reliable way to tell whether an arbitrary IP address is valid.  Many valid machines do not respond to pings for security reasons.


    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    • Proposed as answer by Stanly Fan Monday, January 8, 2018 6:21 AM
    Friday, January 5, 2018 10:43 PM