Coming from node.js I can do this to tell node.js to make the request using ipv6 vs ipv4
var http = require(\"http\");
var options = {
hostname: \"google.c
You can use ServicePoint.BindIPEndPointDelegate.
var req = HttpWebRequest.Create(url) as HttpWebRequest;
req.ServicePoint.BindIPEndPointDelegate = (servicePoint, remoteEndPoint, retryCount) =>
{
if (remoteEndPoint.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6)
{
return new IPEndPoint(IPAddress.IPv6Any, 0);
}
throw new InvalidOperationException("no IPv6 address");
};