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

Lluis Sanchez lluis at ideary.com
Mon May 12 16:47:56 EDT 2003


Hi,

Is the client running on MS.NET? If it is, the problem is that the private
members of ArrayList in Mono are different from the MS.NET version, and it
fails during deserialization. Can you report the bug in Bugzilla?

- Lluis

----- Original Message ----- 
To: <mono-devel-list at lists.ximian.com>
Sent: Sunday, May 11, 2003 1:05 PM
Subject: [Mono-devel-list] 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
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>




More information about the Mono-devel-list mailing list