Sunny
6/30/2004 4:55:00 PM
Hi Chadi,
as Ken suggested, you have no control on which adapter the server will
try to bind for the replay. With your disconnected adapter, server just
tries to send a replay using the disconnected one, and it fails.
Also, when you invoke Activator.CreateInstance, no network connection is
made. The connection is established on the first method invocation, in
your case this is GetLifetime...
You can try what Ken suggested, or you can use bindTo property for the
server channel, so you are sure that the server always uses the right
interface.
Hope that helps
Sunny
In article <u1ZHcHrXEHA.2944@TK2MSFTNGP11.phx.gbl>, zwein@hotmail.com_
says...
> What is bothering me is that why would a SocketException occur on the call
> to GetLifetimeService and not while creating the remote objects??
>
> Furthermore, the SocketException is on the server; what is the server trying
> to connect to?
> Probably itself (Lease Manager<==>CAO), but why would then this fail?
>
> Any idea?
>
> "Chadi Zwein" <zwein@hotmail.com_> wrote in message
> news:enVnt%23dXEHA.3668@TK2MSFTNGP09.phx.gbl...
> > This is a CAO scenario with lifetime management.
> > The remote objects are created successfully!! (no exceptions).
> >
> > Following that, and in the function calling
> > RemotingServices.GetLifetimeService on the remote object, a
> > System.Net.Sockets.SocketException occurs, complaining that the server did
> > not respond in a timely fashion or the connection to the server was
> reset...
> >
> > Server Stack Trace:
> > at System.Net.Sockets.Socket.Connect(EndPoint remote EP)
> > at System.Runtime.Remoting.Channels.RemoteConnection.CreateNewSocket()
> > at System.Runtime.Remoting.Channels.SocketCache.GetSocket(String
> > machineAndPort)
> > :
> > :
> > Exception Rethrown at [0]:
> > at System.Runtime.Remoting.Proxies.RealProxy...
> > :
> > at System.Runtime.MarshalByRefObject.GetLifetimeService()
> > at MyFunction()
> >
> >
> > This error is occurring on exactly 1 testing site among 40 to 50 ones, but
> > it always appears there. Nothing interesting in the event logs, and the IP
> > configuration of both (Windows 2000 SP4) client and server machines is
> very
> > basic. No firewalls involved.
> >
> > Any idea?
> >
> >
>
>
>