Reputation: 41
I have IPv6 string and I want to make the IPAddress object. I tried the following code
String ipString = "2400:3C00:3FFE:0000:0000:5EFE:8999:48AA";
System.Net.IPAddress address;
IPAddress.TryParse(ipString, out address);
but address.ToString() is returning the value "2400:3c00:3ffe::5efe:137.153.72.170".
Why this has been converted to mix ip?
Upvotes: 3
Views: 118
Reputation: 16178
This is, AFAIK, happening on Windows 2003 + XP (maybe Vista, but I'm not sure), because of their implementation of IPv6. On newer OSes it will be ok.
Upvotes: 1