[Mono-bugs] [Bug 354926] New: Remoting class implementing interface type throws RemotingException in client and client fails

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 18 19:03:11 EST 2008


           Summary: Remoting class implementing interface type throws
                    RemotingException in client and client fails
           Product: Mono: Runtime
           Version: 1.2.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: remoting
        AssignedTo: lluis at novell.com
        ReportedBy: rcook at opiumtrail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development

Created an attachment (id=191069)
 --> (https://bugzilla.novell.com/attachment.cgi?id=191069)
Source code and NAnt build file for repro

I have a sample application (see attachment) consisting of a server, client and
a shared component. I declare an interface in the shared component. The server
defines class implementing this interface and the client tries to get an
instance of the remoted object through the interface.

This results in the following exception being thrown in the client:

System.Runtime.Remoting.RemotingException: Cannot cast from client type
'Trac79.Shared.IRemoteObject, Shared, Version=, Culture=neutral,
PublicKeyToken=null' to server type 'Trac79.Server.RemoteObject'

Server stack trace:
  at System.Runtime.Remoting.Messaging.MethodCall.ResolveMethod () [0x00000]
  at System.Runtime.Remoting.Messaging.MethodCall..ctor
(System.Runtime.Remoting.Messaging.Header[] headers) [0x00000]
(System.IO.BinaryReader reader, Boolean hasHeaders,
System.Runtime.Remoting.Messaging.HeaderHandler headerHandler,
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter formatter)
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000]
  at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000]
  at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage
(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) [0x00000]

Remoting an interface like this is supported by the CLR and does not result in
this exception.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list