[Mono-list] Windows to Linux Remoting problem

Zbigniew Babiej zbigniewb@hotmail.com
Mon, 11 Oct 2004 11:23:37 +0000

Hi Robert,

As per your suggestion, I run the network traffic analyzer and discovered 
that there were some
problems with the DNS on that linux box. After correcting the settings it 
works OK now.
Thank you for your input. I should haved taken that error message literally, 
but as I new
that the compatibility between windows and linux was not guaranteed, I 
this error was just a manifest of that incompatibility.

Thank you all for the help,


>From: "Robert Remen" <Robert.Remen@nextranet.at>
>To: "Zbigniew Babiej" <zbigniewb@hotmail.com>
>CC: <mono-list@lists.ximian.com>
>Subject: RE: [Mono-list] Windows to Linux Remoting problem
>Date: Fri, 8 Oct 2004 10:39:06 +0200
>This seems to be an DNS-resolving issue. You provided no source code so
>i can only guess. When the runtime is marshaling object into another
>appdomain (from server to client), it creates an ObjRef class wich
>contains all relevant info to create a proxy (on client) for the
>marshaled object in the another appdomain. Inside this info is also an
>uri wich is used when invokig methods on the marshaled object. The
>problem ist, that this uri is generated on the server. The server uses
>ist hostname to create this uri. If the hostname can not be roselved on
>the client machine, then you get an exception when you try to invoke a
>method on the mashaled object.
>Client calls new MXSRemoteQuote.QuoteProviderController(...) (the
>remoting knows that this is a client activated type, so it sends a
>request to the url from your client config file)
>Server creates an instance of MXSRemoteQuote.QuoteProviderController,
>generates an ObjRef for it (with unique uri for the marshaled instance,
>part of this uri ist the hostname eg "server-xyz") and send is as
>response to the client
>Client creates a proxy object from the ObjRef received from the server
>Client tryes to invoke a method on the proxy class, wich causes the
>remoting to try to send a request to the server, but this fails, because
>the hostname part of the uri ("server-xyz") can not be resolved on the
>I hope this helps you to resolve your problem
>-----Original Message-----
>From: mono-list-admin@lists.ximian.com
>[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Zbigniew Babiej
>Sent: Donnerstag, 07. Oktober 2004 15:53
>To: mono-list@lists.ximian.com
>Subject: [Mono-list] Windows to Linux Remoting problem
>Hello All,
>I was wondering if anyone had encountered the following problem.
>I have a simple remoting test program (binaries compiled with MS .NET C#
>2003 ver. 7.1.3088 .NET Runtime 1.1.4322 SP1).
>This works OK in the scenarios Windows -> Windows(both local and remote
>server) and Linux -> Linux (local server only, did not test remote
>server), but does not work in the scenarions Windows->Linux and
>In the scenario Windows->Linux, the client throws the following
>exception when trying to activate the first object:
>A) When hosted by Mono (ver. 1.0.2):
>Unhandled Exception: System.Runtime.Remoting.RemotingException: No such
>host is known Server stack trace:
>in <0x000c4>
>() in <0x00112>
>System.Runtime.Remoting.Channels.Tcp.HostConnectionPool:GetConnection ()
>in <0x00105>
>in <0x00146>
>in <0x002bc>
>Exception rethrown at [0]:
>in <0x00583> System.Runtime.Remoting.Proxies.RealProxy:PrivateInvoke
>B) When hosted by .NET
>Error: The requested name is valid and was found in the database, but it
>does not have the correct associated data being resolved for
>Source: mscorlib
>Server stack trace:
>    at System.Net.Dns.GetHostByName(String hostName)
>    at System.Net.Dns.Resolve(String hostName)
>    at
>socketCache, String machineAndPort)
>    at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String
>    at
>hRetry(IMessage msg, ITransportHeaders requestHeaders, Stream
>    at
>(IMessage msg, ITransportHeaders requestHeaders, Stream requestStream,
>ITransportHeaders& responseHeaders, Stream& responseStream)
>    at
>Exception rethrown at [0]:
>    at
>reqMsg, IMessage retMsg)
>    at
>msgData, Int32 type)
>    at MXSRemoteQuote.QuoteProvider.AddQuoteListener(IQuoteListener
>    at MXSRemoteClient.RemoteClient.Run()
>In the scenario Linux->Windows , the same errors are reported, but this
>time by the server.
>The windows version is Win2K SP4 and the linux is Fedora Core 2. Both
>machines are in the same lan (switch).
>I tested both IP and hostname, but no success.
>I run other services(like ftp, samba etc.) on that Linux box and can
>access them from Windows clients using both IP and hostname without any
>Would you have any hints about how resolve this issue ?
>The sample binaries can be downloaded from the following link:
>Thank you in advance for your help.
>Zbigniew Babiej, MarketXS.COM
>Here is the server side .config:
>    <system.runtime.remoting>
>       <application>
>          <service>
>            <activated
>              type="MXSRemoteQuote.QuoteProviderController,
>            />
>           <activated
>              type="MXSRemoteQuote.QuoteProvider, MXSRemoteQuote"
>            />
>          </service>
>          <channels>
>              <channel ref="tcp" port="8787">
>                  <serverProviders>
>                      <formatter ref="binary" typeFilterLevel="Full" />
>                   </serverProviders>
>                  <clientProviders>
>                      <formatter ref="binary" />
>                  </clientProviders>
>               </channel>
>          </channels>
>       </application>
>    </system.runtime.remoting>
>... and the client side .config:
>   <system.runtime.remoting>
>     <application name="MXSRemoteTerminal">
>        <channels>
>           <channel ref="tcp" port="0">
>              <clientProviders>
>                 <formatter ref="binary" />
>              </clientProviders>
>              <serverProviders>
>                 <formatter ref="binary" typeFilterLevel="Full" />
>              </serverProviders>
>           </channel>
>        </channels>
>        <client url="tcp://">
>          <activated type="MXSRemoteQuote.QuoteProviderController,
>MXSRemoteQuote" />
>          <activated type="MXSRemoteQuote.QuoteProvider, MXSRemoteQuote"
>       </client>
>     </application>
>   </system.runtime.remoting>
>Tired of spam? Get advanced junk mail protection with MSN 8.
>Mono-list maillist  -  Mono-list@lists.ximian.com

Help STOP SPAM with the new MSN 8 and get 2 months FREE*