Getting a stream back from a .Net remoting service that is accessible with IP v4 and v6
Posted
by jon.ediger
on Stack Overflow
See other posts from Stack Overflow
or by jon.ediger
Published on 2010-06-08T22:21:43Z
Indexed on
2010/06/10
4:02 UTC
Read the original article
Hit count: 186
My company has an existing .Net Remoting service that listens on a port, fronting interfaces used by external systems. This all works great with IP v4 based communications. However, this service now needs to support both IP v4 communications and IP v6 communications. I have found info that the system.runtime.remoting section of the app.config should include two channels as follows:
<channel ref="tcp" name="tcp6" port="9000" bindTo="[::]" />
<channel ref="tcp" name="tcp4" port="9000" bindTo="0.0.0.0" />
The above config file changes to the System.Runtime.Remoting config section will get the remoting service responding to non-stream functions on both ip v4 and ip v6. The issue comes only when attempting to get a stream back, used to upload or download large files. In this case, instead of getting a usable stream back, the following ArgumentException is thrown instead:
IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that
cannot be used as a target address.
Parameter name: hostNameOrAddress
Is there a way to modify the app.config (in the system.runtime.remoting section, or another section) so that the service will return a stream mapped to a real ip so the client can actually upload/download files while maintaining the ability to use both IP v4 and IP v6?
© Stack Overflow or respective owner