Say, is anyone else using WCF under Vista and seeing delays on the order of
7-8 seconds when a WCF client, using the net.TCP binding, establishes a
connection with a non-local service?
I have a service running on one machine and a client running on another.
Both are running Vista on the same intranet using no security (message or
transport). If I turn on tracing and view the log using svctraceviewer, it
appears as though it takes 7-8 seconds between the time the TCP connection is
initiated and the Socket Connection is created.
<TimeCreated SystemTime="2006-11-26T00:07:53.0026996Z" />
<Description>Initiating TCP connection.</Description>
....
<TimeCreated SystemTime="2006-11-26T00:08:00.4182406Z" />
<Description>SocketConnection create</Description>
This happens each time the client object is opened prior to calling the
service.
If I fire up the same client using the same configuration connecting to the
same service under Windows Server 2003 the time between initialization and
connection is a matter of milliseconds.
I've reproduced the delay by running the netTCP binding sample located in
C:\Program Files\Microsoft
SDKs\Windows\v6.0\Samples\WCFSamples\TechnologySam ples\Basic\Binding\Net\Tcp\Default with the client and server on different physical machines.
Anyone have any advice? I've tried competely opening the firewall and
running the client under elevated privs... but the 7-8 second connection
delay still occurs. Is there some additional configuration that needs to
occur under Vista?
The only workaround I've found is to re-use the connection by not
closing/aborting the generated object that extends ClientBase<Tso that the
delay only occurs once -- but, of course, if the channel gets faulted, or
times out resulting in a fault, it starts to become problematic.
Thanks,
--Sean