The Resolve
method is obsolete, and Microsoft directs you to use GetHostEntry
. However when using GetHostEntry
the exception occurs:
This host is not known
When I use Resolve
there is no exception and the program works correctly.
The Ip's used are from the LAN to which my pc is connected. I did a test by placing a remote Ip, from Google, and then GetHostEntry
generated no exception, ie, it does not work with my lan's Ip's.
How can I solve this problem using GetHostEntry
?