[Mono-list] Trouble in Connecting Winodws and Linux Applications

Omid Hodjati omid_hodjati@yahoo.com
Fri, 11 Apr 2003 23:27:52 -0700 (PDT)


Hi All,
I'm new to Mono and I have just started creating
application using this .Net framework implementation.
I have created a client/server aplication that works
on a mix platform; client runs on windows (Win2000)
and servers on Linux (Redhat 8.0). My problem is as
follows:
I have created client and servers (C#) and i want to
connect them to each other using Remoting technology.
Although the client and servers run and connect to
each other while I execute them on a Linux machine, I
can not use them when on (or both) of them run on
windows platform. It means that :
Linux----Linux ==> OK
Linux----Winodws ==> Error
Windows----Linux ==> Error
Windows----Windows ==> Error

The Client and Server source code and compilation
commmands are as followes: 

***************** Clinet *******************
*****Source Code **************************
using System;
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting;
using System.Collections;

namespace HelloWorldClient
{
    class ClientClass
    {
		[STAThread]
		static void Main(string[] args)
		{
            IDictionary param = new Hashtable();
            param["port"] = 0;
            ChannelServices.RegisterChannel(new
TcpChannel(param, new
BinaryClientFormatterSinkProvider(), new
BinaryServerFormatterSinkProvider()));
            Uri u = (Uri)
Activator.GetObject(typeof(Uri),
"tcp://soft2:4321/URI");
            string s = u.Host.ToString();
            Console.WriteLine(s);
            Console.ReadLine();
		}
	}
}
*******Compilation ******************************
mcs -lib:c:\mono-0.23\lib -r:System.Runtime.Remoting 
Client.cs
********************************************

***************************Server********************
*********Source Code*********************************
using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
using System.Collections;

namespace HelloWorld
{
	class ServerClass
	{
		[STAThread]
		static void Main(string[] args)
		{
            IDictionary param = new Hashtable ();
            param["port"] = 4321;
            Console.WriteLine("Hello World from MS
World!!");
            ChannelServices.RegisterChannel(new
TcpChannel(param, new
BinaryClientFormatterSinkProvider (), new
BinaryServerFormatterSinkProvider()));
            Uri u = new Uri("http://www.yahoo.com",
false);
            RemotingServices.Marshal(u, "URI");
            Console.ReadLine();
		}

        
	}
}
******************Compilation ************************
mcs -lib:c:\mono-0.23\lib -r:System.Runtime.Remoting 
Server.cs
****************************************************


I get This exception when i run client application :
"unknown response message from server"

What is wrong with me? What should i do to make it
fixed? 

Thanks formerly.

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com