Bug 40758 - [Regression] Remoting instance is not proxied
Summary: [Regression] Remoting instance is not proxied
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 4.4.0 (C7)
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
Depends on:
Reported: 2016-04-28 13:01 UTC by Александр
Modified: 2016-05-11 18:01 UTC (History)
2 users (show)

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

source code (34.94 KB, application/x-zip-compressed)
2016-04-28 13:01 UTC, Александр
source code (9.06 KB, application/x-zip-compressed)
2016-05-11 10:24 UTC, Александр
screen (320.32 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-05-11 10:31 UTC, Александр

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Александр 2016-04-28 13:01:09 UTC
Created attachment 15866 [details]
source code

Unable to create a remote object class using Remoting technology Mono version 4.x. On Mono version 3.x everything is working properly.
On Mono version 4.x going to create an object on the client side, and should be on the server side.
I attach the source code of the program.
Comment 1 Marek Safar 2016-05-05 14:09:05 UTC
I cannot reproduce the issue. Using your sample code I get following output

Enter Server IP:
05 May 2016 16:03:46

What error do you get?
Comment 2 Александр 2016-05-06 07:19:13 UTC
The error does not occur, but there is no reference to TestServer.
TestClient should not be carried out without TestServer.
Message "[]" should be displayed on TestServer
Replace source code that we could enter IPAdress:
namespace TestClient
    using System;
    using System.Runtime.Remoting.Activation;
    using System.Runtime.Remoting.Channels;
    using System.Runtime.Remoting.Channels.Tcp;
    using Logic;

    class Program
        static void Main ()
            const string clientChannelId = "4486C82E-B97D-45d5-AF71-96EA32AF6119";
            IChannel foundChannel = ChannelServices.GetChannel (clientChannelId);
            if (foundChannel == null)
                var channel = new TcpClientChannel (clientChannelId, null);
                ChannelServices.RegisterChannel (channel, false);

            Console.WriteLine ( "Enter Server IP:");
            string ip = Console.ReadLine ();
            string serverLocation = string.Format ( "{0}: 2003", ip);

object [] url = {new UrlAttribute (string.Format ( "tcp: // {0}", serverLocation))};
            object [] args = {StringExtention.GetCurrentIp ()};
            var mediator = (MpSyncMediator) Activator.CreateInstance (typeof (MpSyncMediator), args, url);

Console.WriteLine (mediator.GetServerDateTime () ToString ( "F").);
Console.ReadKey ();
Comment 3 Александр 2016-05-11 06:03:10 UTC
Invalid work Remoting technology Mono version 4.x.
Comment 4 Marek Safar 2016-05-11 09:14:33 UTC
I am not sure I follow. I ran the test with test server running.

The output is from your test-client which does `Console.WriteLine (mediator.GetServerDateTime () ToString ( "F").)`

I am not sure what else to try to reproduce your behaviour which you didn't describe yet.
Comment 5 Александр 2016-05-11 10:24:24 UTC
Created attachment 15966 [details]
source code

Constructor must be executed on the side of TestServer. 

public MpSyncMediator(string str)

I have it performed on TestClient.
Comment 6 Александр 2016-05-11 10:31:50 UTC
Created attachment 15967 [details]
Comment 7 Александр 2016-05-11 10:32:34 UTC
Invalid work Remoting technology Mono version 4.x.
Comment 8 Marek Safar 2016-05-11 18:01:36 UTC
Fixed in master