[Mono-list] Q: Problem with remoting ?

Lluis Sanchez lluis@ximian.com
Fri, 21 May 2004 18:50:07 +0200


This is a bug about RemotingConfiguration not loading the default
channels. It is already fixed in CVS. If you can't wait for beta2, an
easy workaround is to call RemotingConfiguration.Configure(null) before
GetObject().

Lluis.

On dv, 2004-05-21 at 17:38, Michael Erdmann wrote:
> Dear all,
> 
> i have copied the attached remoting test programs from the net and
> tested it on a windows XP Box and a Linux system with the latest mono
> rpm. Windows works fine, Mono does not work!
> 
> It this a known Problem, a limitation since remoting seems to be 
> implemented for 99% or simply a bug?
> 
> namespace Test.Log
> {
>     using System;
>  
>     public class Logger : MarshalByRefObject
>     {
>         public void Log(String aString)
>         {
>             Console.WriteLine(aString);
>         }
>     }
> }
> 
> namespace Test.Server
> {
>     using System;
>     using System.Runtime.Remoting;
>     using System.Runtime.Remoting.Channels;
>     using System.Runtime.Remoting.Channels.Http;
>     using System.Runtime.Remoting.Channels.Tcp;
>     using Test.Log;
>  
>     public class Server
>     {
>         public static void Main()
>         {
>             ChannelServices.RegisterChannel(new HttpChannel(8010));
>             ChannelServices.RegisterChannel(new TcpChannel(8011));
>  
>             RemotingConfiguration.RegisterWellKnownServiceType(
>                 typeof(Logger), "Log", WellKnownObjectMode.Singleton);
>  
>             Console.WriteLine("Press enter to stop the server...");
>             Console.ReadLine();
>         }
>     }
> }
> namespace Test.Client
> {
>     using System;
>     using System.Runtime.Remoting;
>     using Test.Log;
>  
>     public class Client
>     {
>         public static void Main(string[] args)
>         {
>             //Logger httpLogger =
>             //    (Logger)Activator.GetObject(
>             //      typeof(Logger), "http://localhost:8010/Log");
>             Logger tcpLogger =
>                 (Logger)Activator.GetObject(
>                   typeof(Logger), "tcp://localhost:8011/Log");
>  
>             Console.WriteLine("Executing requests");
>             //httpLogger.Log("HTTP Client Request");
>             tcpLogger.Log("TCP Client Request");
>         }
>     }
> }
> 
>  
> 
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list