[Mono-devel-list] Re: BUG - Remoting of an ArrayList in Mono .24

Matt Davey Matt.Davey at finetix.com
Thu May 15 03:32:06 EDT 2003


Hi,

Does anyone else see this issue, and is there a fix if it is a bug ?

Later

----- Original Message ----- 
From: "Matt Davey" <matt.davey at finetix.com>
To: <mono-devel-list at lists.ximian.com>
Sent: Sunday, May 11, 2003 12:05 PM
Subject: Remoting of an ArrayList in Mono .24


> Hi,
>
> First off, Mono 0.24 remoting is a massive jump in functionality over
> previous version. 0.24 is very cool indeed.
>
> I'm currently trying to get a Windows XP C# console application talking to
a
> Mono 0.24 server running on RH 8.0 using the new interface support in
0.24.
> Eveything works fine apart from when I try to send an ArrayList from the
> Windows client to the Mono server.
>
> Client code:
>
> ChannelServices.RegisterChannel(new TcpChannel(0));
> IServerObject s =
> Activator.GetObject(typeof(IServerObject),"tcp://localhost:8085/Test") as
> IServerObject;
> ArrayList al = new ArrayList();
> al.Add("one");
> al.Add("two");
> s.Send(al);
>
> server code:
>
> public interface IServerObject
> {
> void Send(ArrayList al);
> }
>
> public class HelloServer: MarshalByRefObject , IServerObject
> {
>
> public void Send(ArrayList al)
> {
> foreach (object o in al)
> {
> Console.WriteLine(o);
> }
> }
> }
>
> I see no errors on RH, but on the client I get this:
>
> Unhandled Exception: System.Runtime.Remoting.RemotingException: Underlying
> socke
> t was closed.
>
> Server stack trace:
>    at System.Runtime.Remoting.Channels.SocketHandler.ReadFromSocket(Byte[]
> buffe
> r, Int32 offset, Int32 count)
>    at System.Runtime.Remoting.Channels.SocketHandler.BufferMoreData()
>    at System.Runtime.Remoting.Channels.SocketHandler.Read(Byte[] buffer,
> Int32 o
> ffset, Int32 count)
>    at
> System.Runtime.Remoting.Channels.SocketHandler.ReadAndMatchFourBytes(Byte[
> ] buffer)
>    at
> System.Runtime.Remoting.Channels.Tcp.TcpSocketHandler.ReadVersionAndOperat
> ion(UInt16& operation)
>    at
> System.Runtime.Remoting.Channels.Tcp.TcpClientSocketHandler.ReadHeaders()
>    at
> System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage
> (IMessage msg, ITransportHeaders requestHeaders, Stream requestStream,
> ITranspor
> tHeaders& responseHeaders, Stream& responseStream)
>    at
> System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMess
> age(IMessage msg)
>
> Exception rethrown at [0]:
>    at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
> req
> Msg, IMessage retMsg)
>    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
> msgDa
> ta, Int32 type)
>    at comlib.IServerObject.Send(ArrayList al)
>    at clientcomlib.Class1.Main(String[] args) in d:\visual studio
> projects\mono\
> clientcomlib\client.cs:line 45
>
> If I run the client and server on MS .NET everything works fine.
>
> Later
>




More information about the Mono-devel-list mailing list