Client-Server Communication

Hi,

Im using .Net 1.1 SP1, and in my scenario, I have the server and the client applications that use tcp channel and binary formatter.

The client connects to the server, and registers himself by calling the server subscribeClient method, this method receives an object named (client) that is an instance of IClient and is MarshalByRefObject and marked with the [Serialiazable] attribute, this object contains the client properties and the methods that the server needs call at the client side later, this scenario is working fine when the client and the server are on the same machine or reside within the same LAN, when the client tries to connect to the server through the internet he is being able to instantiate the Remote server object by calling the subscribeClient method, but when this method tries to retreive any client property like "client.name" I get the following Exception message at the server:-

"Server encountered an internal error. For more information, turn on customErrors in the server’s .config file”

I've reset the parameters in the Server.config and client.config files as it follows to include the <customErrors mode="off"/>, and then after re-executing the scenario I've got the following Exception message at the server side:-
"No connection could be made because the target machine actively refused it"

-
Server.config
--

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application name = "EventsManagerHost">
<service>
<wellknown type="EventsManager.Hoster,EventsManager" objectUri="Connect" mode="Singleton" />
</service>
<channels>
<channel ref="tcp" port="1940">
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
</application>
<customErrors mode="off"/>
</system.runtime.remoting>
</configuration>
-
Client.config
-
<configuration>
<system.runtime.remoting>
<application name="Server">
<client>
<wellknown
type="EventsManager.Hoster, EventsManager"
url="tcp://212.118.18.71:1940/Connect"
/>
</client>
<channels>
<channel ref="tcp" port="0" clientConnectionLimit="20">
<clientProviders>
<formatter ref="binary" />
</clientProviders>
<serverProviders>
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
</channel>
</channels>
</application>
<customErrors mode="off"/>
</system.runtime.remoting>
</configuration>

Any help would be highly appreciated.

Many thanks,

Sara

[2934 byte] By [Sara12534] at [2008-1-25]
# 1

Sara,
First make sure that the port that is open on the server machine is open to all trafic outside. A easy way to do this is to try telnet to that machine:port. This way you make sure the port is open. Other then that I would check if there is any firewall or some secuirty that is set on the server machine.

good luck

ka

KamranAmin at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...
# 2

The above posts offer good suggestions.

A simple test is if you can ping the machine -- although the local firewall needs to allow this operation into the machine

douglasp at 2007-8-21 > top of Msdn Tech,.NET Development,.NET Remoting and Runtime Serialization...

.NET Development

Site Classified