Groups | Blog | Home
all groups > dotnet remoting > may 2004 >

dotnet remoting : Disconnecting Network Cable and Channel Types


Steve Binney
5/24/2004 7:48:42 AM
I have a client/server application that uses remoting. The client and
server are separate applications that can either run on the same computer or
run on separate computers in the same domain. Both computers have the .Net
framework 1.1 installed.

Based on these requirements, I have chosen the TcpChannel with the binary
formatter for maximum performance.

I am having the following problem running both client and server on the same
machine: when I disconnect the network cable or power off the network
switch, the client app hangs in the remoting call with the exception :

"A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond"

When I use HttpChannel with the binary formatter, I do not get this error.
I would prefer to use Tcp but I cannot tolerate the client hanging when
disconnected.

What is recommended?

Steve Binney


Sahil Malik
5/26/2004 1:11:33 AM
Steve,

The problem sounds more like a network config issue. Strange as it may
sound, Remoting uses DNS entries to convert names to IP addresses in certain
cases (service discovery) and WINS in others (sponsors). Not only that, if
your network is split into more than one domains, then your app might be
viewing an IP address from within a domain, that might be incorrect on the
other. So to test, first make sure that both PCs are forced to be on the
same domain.

Then, try this, ping client from server, and ping client from client.
then ping server from server and ping server from client.

Check and see if all IP addresses match and are all as expected..

Also, while your client app is hung, give the following command on dos
prompt - "netstat -n" to check and see where in the world is the request
going to. Then do a nbtstat -a <<ipadddress>> to verify if the computer
names tally with the servername.

Obviously first check and make sure that your server is running in the first
place.

This is not a bad code issue IMHO. It's network settings and
pleading/yelling at your infrastructure group.

- Sahil Malik
Independent Consultant
You can reach me thru my blog at -
http://www.dotnetjunkies.com/weblog/sahilmalik/



[quoted text, click to view]

Doug Forster
5/27/2004 12:00:16 PM
Hi Steve,

Further to Sahil's reply. Windows will completely shut down the TCP/IP stack
if the machine is not actively connected to a network. This is not
specifically a .NET issue - e.g. SQL Server will not run even locally in
this situation. I would suspect .NET is possibly running into this behind
the scenes, though that doesn't really explain why http still works . The
usual workaround is to install the MS loopback adapter to simulate a network
connection. I'd suggest you try this.

Cheers

Doug Forster

[quoted text, click to view]

AddThis Social Bookmark Button