RE: [Mono-list] Remoting betweem Mono and MS .NET
Hi, I'm using MS.NET 1.1.4322.573 and mono build from mono-daily package from yesterday (20040621). Your sample application works fine (Server running on FC1 with mono, client on WIN2003 Server with MS.NET). What version of mono do you use? Anyway, are you sure, that you pass the right address as a parameter to the client? I get this sort of exception, when the the server application is not running at all (or is running somwhere else as defined by the parameter passed to the client). Robert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yuri Leikind Sent: Montag, 21. Juni 2004 17:24 Cc: [EMAIL PROTECTED] Subject: Re: [Mono-list] Remoting betweem Mono and MS .NET On Mon, 21 Jun 2004 16:35:39 +0200 RoBiK [EMAIL PROTECTED] wrote: I use remoting between Mono and MS.NET, and it works fine for me. What problems do you have? Robert I run a remoting server on Linux, and try to use it from the Windows machine. Here is my code: common interface, build as a separate assembly == namespace ProofOfConcepts{ public interface ITest{ string SayHello(); } } == Client using System; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; namespace ProofOfConcepts{ class Client{ ITest ar; public Client(string host, int port, string endPoint){ HttpChannel channel = new HttpChannel(0); ChannelServices.RegisterChannel(channel); MarshalByRefObject obj = (MarshalByRefObject) RemotingServices.Connect( typeof(ProofOfConcepts.ITest), http://; + host + : + port + / + endPoint); ar = (ITest) obj; } public string SayHello(){ return ar.SayHello(); } public static void Main(string[] args){ Client client = new Client(args[0], 6, MyEndPoint); Console.WriteLine(client.SayHello()); } } } == Server using System; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; namespace ProofOfConcepts{ public class AssemblyCache : MarshalByRefObject, ITest{ public string SayHello(){ return hello; } } class RemotingServer{ public RemotingServer(object obj){ HttpChannel channel = new HttpChannel(6); ChannelServices.RegisterChannel(channel); MarshalByRefObject mobj = (MarshalByRefObject) obj; RemotingServices.Marshal(mobj, MyEndPoint); } void Listen(){ Console.WriteLine(Press Enter to exit...); Console.ReadLine( ); } public static void Main(){ AssemblyCache ar = new AssemblyCache(); RemotingServer rServer = new RemotingServer(ar); rServer.Listen(); } } } == Here is what I get running the client: Unhandled Exception: System.Net.WebException: The underlying connectio n was closed: The request was canceled. Server stack trace: at System.Net.HttpWebRequest.CheckFinalStatus() at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult async Result) at System.Net.HttpWebRequest.GetRequestStream() at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.Pr ocessAndSend(IMessage msg, ITransportHeaders headers, Stream inputStre am) at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.Pr ocessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream re questStream, ITransportHeaders responseHeaders, Stream responseStrea m) at System.Runtime.Remoting.Channels.SoapClientFormatterSink.SyncPro cessMessage(IMessage msg) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IM essage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageD ata msgData, Int32 type) at ProofOfConcepts.ITest.SayHello() at ProofOfConcepts.Client.Main(String[] args) === My Mono version is 0.95, MS .NET version 1.1.4322 -- Best regards, Yuri Leikind ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
RE: [Mono-list] Remoting betweem Mono and MS .NET
I use remoting between Mono and MS.NET, and it works fine for me. What problems do you have? Robert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yuri Leikind Sent: Montag, 21. Juni 2004 16:03 To: [EMAIL PROTECTED] Subject: [Mono-list] Remoting betweem Mono and MS .NET Hello all, Is remoting between Mono and MS .NET supposed to be possible? I tried different variants, seems line currently you cannot remote between these 2 platforms. -- Best regards, Yuri Leikind ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
Re: [Mono-list] Remoting betweem Mono and MS .NET
On Mon, 21 Jun 2004 16:35:39 +0200 RoBiK [EMAIL PROTECTED] wrote: I use remoting between Mono and MS.NET, and it works fine for me. What problems do you have? Robert I run a remoting server on Linux, and try to use it from the Windows machine. Here is my code: common interface, build as a separate assembly == namespace ProofOfConcepts{ public interface ITest{ string SayHello(); } } == Client using System; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; namespace ProofOfConcepts{ class Client{ ITest ar; public Client(string host, int port, string endPoint){ HttpChannel channel = new HttpChannel(0); ChannelServices.RegisterChannel(channel); MarshalByRefObject obj = (MarshalByRefObject) RemotingServices.Connect( typeof(ProofOfConcepts.ITest), http://; + host + : + port + / + endPoint); ar = (ITest) obj; } public string SayHello(){ return ar.SayHello(); } public static void Main(string[] args){ Client client = new Client(args[0], 6, MyEndPoint); Console.WriteLine(client.SayHello()); } } } == Server using System; using System.IO; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using System.Runtime.Remoting.Channels.Http; namespace ProofOfConcepts{ public class AssemblyCache : MarshalByRefObject, ITest{ public string SayHello(){ return hello; } } class RemotingServer{ public RemotingServer(object obj){ HttpChannel channel = new HttpChannel(6); ChannelServices.RegisterChannel(channel); MarshalByRefObject mobj = (MarshalByRefObject) obj; RemotingServices.Marshal(mobj, MyEndPoint); } void Listen(){ Console.WriteLine(Press Enter to exit...); Console.ReadLine( ); } public static void Main(){ AssemblyCache ar = new AssemblyCache(); RemotingServer rServer = new RemotingServer(ar); rServer.Listen(); } } } == Here is what I get running the client: Unhandled Exception: System.Net.WebException: The underlying connectio n was closed: The request was canceled. Server stack trace: at System.Net.HttpWebRequest.CheckFinalStatus() at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult async Result) at System.Net.HttpWebRequest.GetRequestStream() at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.Pr ocessAndSend(IMessage msg, ITransportHeaders headers, Stream inputStre am) at System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.Pr ocessMessage(IMessage msg, ITransportHeaders requestHeaders, Stream re questStream, ITransportHeaders responseHeaders, Stream responseStrea m) at System.Runtime.Remoting.Channels.SoapClientFormatterSink.SyncPro cessMessage(IMessage msg) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IM essage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageD ata msgData, Int32 type) at ProofOfConcepts.ITest.SayHello() at ProofOfConcepts.Client.Main(String[] args) === My Mono version is 0.95, MS .NET version 1.1.4322 -- Best regards, Yuri Leikind ___ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list