F
Frank Jiao
I can get my local IPv6 address in Win2003 use the source code as below:
string localName = Dns.GetHostName();
string address = "";
string scopeId = "";
IPHostEntry hostEntry = Dns.Resolve( localName );
foreach (IPAddress curAdd in hostEntry.AddressList)
{
if(curAdd.AddressFamily.ToString() ==
ProtocolFamily.InterNetworkV6.ToString())
{
scopeId = curAdd.ScopeId.ToString();
address = curAdd.ToString();
break;
}
}
Then, I set the config about IPv6 in WinXP as the same as Win2003. when I
run the source code in WinXP, I can only get the loopback
:1) address but
not local IPv6 address.
Thank you for your help!
Frank Jiao
string localName = Dns.GetHostName();
string address = "";
string scopeId = "";
IPHostEntry hostEntry = Dns.Resolve( localName );
foreach (IPAddress curAdd in hostEntry.AddressList)
{
if(curAdd.AddressFamily.ToString() ==
ProtocolFamily.InterNetworkV6.ToString())
{
scopeId = curAdd.ScopeId.ToString();
address = curAdd.ToString();
break;
}
}
Then, I set the config about IPv6 in WinXP as the same as Win2003. when I
run the source code in WinXP, I can only get the loopback

not local IPv6 address.
Thank you for your help!
Frank Jiao