Dns.GetHostEntry used to return IPv4 and/or IPv6 addresses when appropriate. It now no longer works with IPv6.
This throws an exception
var hostEntry = Dns.GetHostEntry("ipv6.google.com").AddressList;
This returns a list of only IPv4 addresses
var hostEntry = Dns.GetHostEntry("google.com").AddressList;
Fixed in master and Mono 4.8
I have checked this Issue with latest master build (Mono 22.214.171.1240). I am still getting exception when using ipv6.
Exception details: https://gist.github.com/saurabh360/0ae7d62eeff087adfcaa8de01e6efcbe
Environment Info: https://gist.github.com/c16d963aa7ea93d0ba15194248e76941
@Saurabh Do you really have IPv6 network working e.g does ping to ipv6 address work for you?
I have checked it again and I am using IPv6 network and still getting exception.
Exception details: https://gist.github.com/AkhileshKumar01/ab907439486a2911c060ac4ae6c73f6f
Environment Info: https://gist.github.com/AkhileshKumar01/3f2844619e5665528b7f80d4855408e2
Does ping to ipv6 from terminal work ?
@Marek, I setup IPv6 using document: https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html
Below are my output from terminal after setting this IPv6:
Please let me know if I can provide any more info.
If you cannot ping ipv6 google server from terminal it'll hardly work from the app. You should see something like if your network is ipv6/dns6.
PING6(56=40+8+8 bytes) 2a01:110:1008:40:5cb3:3661:6720:35ee --> 2a00:1450:4009:800::200e
16 bytes from 2a00:1450:4009:800::200e, icmp_seq=0 hlim=47 time=28.946 ms
16 bytes from 2a00:1450:4009:800::200e, icmp_seq=1 hlim=47 time=28.878 ms
16 bytes from 2a00:1450:4009:800::200e, icmp_seq=2 hlim=47 time=27.303 ms
16 bytes from 2a00:1450:4009:800::200e, icmp_seq=3 hlim=47 time=27.433 ms
You could also check http://ipv6-test.com/
@Marek, I have again tried to setup ipv6 locally using mac with document: https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html and checked that ipv6 address appearing in network preference but when I am checking using http://ipv6-test.com/ It is showing me not supported for both ipv4 and ipv6. This is the screencast for the same: https://www.screencast.com/t/g7IltjZF
Could you please let me know how can I setup this ipv6 so that I can verify this Issue?
I have no idea how your local network is setup, it's best to talk to your network administrator how to make ipv6 work for you