Using IPv6 with .NET Framework Remoting
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Using IPv6 with .NET Framework Remoting 

You can use IPv6 addresses with .NET remoting applications because the Uri class supports IPv6 addressing. To specify IPv6 addresses, use square brackets ("[]") to avoid confusion with the port specification. Both compressed and full length IPv6 addresses are supported. IPv6 is supported by default in Windows Vista. IPv6 can also be installed on Windows Server 2003 and Windows XP. Windows Vista allows you to disable IPv4 and use IPv6 exclusively. Windows Server 2003 and Windows XP do not allow you to disable IPv4.

Specifying IPv6 Addresses

The following <channel> element demonstrates how to specify an IPv6 address in a configuration file:

<channel ref="tcp" name="MyChannel" port="8080" bindTo="[FFE2:5::3]">

The following code example demonstrates how to specify an IPv6 address programmatically:

IDictionary props = new Hashtable();
props["port"] = "8080";
props["useIpAddress"] = "true";
props["bindTo"] = "[FFE2:0005:0000:0000:0000:0000:0000:0003]";
TcpChannel chan = new TcpChannel(props, null, new BinaryServerFormatterSinkProvider());

See Also

© 2016 Microsoft