[Mono-dev] Remoting HttpChannel/SoapFormatter problems

Martin Green martin at martsoft.co.uk
Thu Apr 10 06:58:08 EDT 2008

Hi all,

I'm working on a large project that uses remoting and have been getting
strange errors on mono, this all works fine on MS .Net.
It uses HttpChannels with SoapFormatter as i believed this would be more
likely to be compatible between mono and .net than binaryformatter.

The first method i call on the remote object runs correctly but
subsequent ones all cause this error, with different id numbers.
Unhandled Exception:
System.Runtime.Serialization.SerializationException: The object with ID
2 could not be resolved
Server stack trace:
  at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000]
System.Runtime.Serialization.Formatters.Soap.SoapReader.get_TopObject ()
  at System.Runtime.Serialization.Formatters.Soap.SoapReader.Deserialize
(System.IO.Stream inStream, ISoapMessage soapMessage) [0x00000]
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000]
(System.IO.Stream serializationStream) [0x00000]
(IServerChannelSinkStack sinkStack, IMessage requestMsg,
ITransportHeaders requestHeaders, System.IO.Stream requestStream,
IMessage& responseMsg, ITransportHeaders& responseHeaders,
System.IO.Stream& responseStream) [0x00000]
Exception rethrown at [0]:
  at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg,
System.Exception& exc, System.Object[]& out_args) [0x00185] in

I couldnt find a cause for this in my program so i took the remoting
example from
to try to make a simple program to reproduce this error. In the end all
i had to do was swap it from using Tcpchannel to http and this causes
the same error. this does work on .Net 2.0, apart from some security

i have attached the files to reproduce this error. compile and run same
as original sample.

So my question is this. Is the http and soap implementation complete, am
i doing something stupid, or should i file a bug report?


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: RemotingClient.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080410/e08a3257/attachment-0003.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: RemotingServer.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080410/e08a3257/attachment-0004.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ServerList.cs
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080410/e08a3257/attachment-0005.pl 

More information about the Mono-devel-list mailing list