Bug 5694 - Mono sends remoting messages different than .NET does when calling interface method implemented in a shared type
Summary: Mono sends remoting messages different than .NET does when calling interface ...
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib (show other bugs)
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-06-17 07:27 UTC by omosnacek
Modified: 2012-06-17 07:27 UTC (History)
1 user (show)

See Also:
Is this bug a regression?: ---
Last known good build:

Test case with outputs (4.58 KB, application/x-gzip)
2012-06-17 07:27 UTC, omosnacek

Description omosnacek 2012-06-17 07:27:02 UTC
Created attachment 2072 [details]
Test case with outputs

In the test case there is a solution with three projects - a common type library (BugTest), a remoting client application (BugTest.Client) and a server application (BugTest.Server). The client application recieves a proxy to an object which implements interface ITest. This object is an instance of class TestImpl which is known to both server and client (it is defined in the common library). When the client calls a method on the proxy through interface ITest, the remoting message sent to the server refers to the method that is the implementation of the ITest's method in TestImpl, rather than referring to the ITest's method itself.

This problem becomes serious when the server runs on .NET, the client on Mono and the ITest's method is implemented explicitly in TestImpl. In this case, .NET recognizes the method as private and therefore throws a RemotingException. When you run the client application on .NET, you can see that in the message it refers to the method defined in ITest, not to the TestImpl's implementation.

In the attachment, I also included outputs of client and server when run in different evironments ("mono->net_client.out", for example, is the output of client where client ran on Mono, server ran on .NET).
Mono details: v2.10.x on Linux
.NET Framework details: v4.0 on Windows XP

The server application accepts one command-line argument - the port to listen on. The client application accepts two arguments - the address and port of the server.

I believe that Mono should generate the same messages as .NET in these cases in order to prevent problems with .NET servers.

Note You need to log in before you can comment on or make changes to this bug.