Getting a .Net remoting service accessible with IP v6 and IP v4

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/08 22:52 UTC
Read the original article Hit count: 680

Filed under:
|
|
|

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" />

I've tried this. For communications to this service and a direct response back, this works great. Some of the communications instead return a stream back, either for uploading or downloading large files. These calls fail with the an ArgumentException:

IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. Parameter name: hostNameOrAddress

How should these config values be modified so that the client will know how to communicate back to the .Net remoting service?

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET