[Mono-bugs] [Bug 660474] Not compatiable with Microsoft .NET

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 7 04:04:30 EST 2011


https://bugzilla.novell.com/show_bug.cgi?id=660474

https://bugzilla.novell.com/show_bug.cgi?id=660474#c4


--- Comment #4 from J.P. Park <mailing at mono.developer.kr> 2011-02-07 09:04:29 UTC ---
--- TestBug1.exe source

using System;

namespace TestBug1
{
    class Program
    {
        static void Main(string[] args)
        {
            var client = (Bug1.Class)Activator.GetObject(typeof(Bug1.Class),
"tcp://YOUR WINDOWS SERVER IP:25501/BugTest");
            var temp = client.Test();
        }
    }
}


--- Bug1.exe source

using System;
using System.Collections.Generic;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Threading;

namespace Bug1
{
    public static class Daemon
    {
        static void Main(string[] args)
        {
            var run = new Thread(OnStart);
            run.Start();
            run.Join();
            Environment.Exit(0);
        }

        private static void OnStart()
        {
            var myClass = new Class();
            RemotingServices.Marshal(myClass, "BugTest");
            var channelTCP = new
System.Runtime.Remoting.Channels.Tcp.TcpServerChannel("BugTest", 25501);
            ChannelServices.RegisterChannel(channelTCP, false);
            while (true)
                Thread.Sleep(600000);
        }
    }

    public class Class : MarshalByRefObject
    {
        public Class()
        {

        }
        public Dictionary<string, int> Test()
        {
            return new Dictionary<string, int>();
        }
    }
}

-- 
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