views:

13

answers:

1

Hi,

When I dispose wcf client proxy, is TcpConnection still available?

(netTcpBinding has been used)

+1  A: 

The connection itself can be available in some special configurations with connection pooling but you are probably asking if the service instance/session is still available. The answer is no. Lifetime of proxy and its related service instance are coupled (+ timeouts can affect lifetime). So when you close the proxy you can't use the instance ("connection") any more.

Ladislav Mrnka
Is connection pooling default configuration?
mkus
It should be enabled by default. It is controlled by MaxConnections property of NetTcpBinding. Default value for this property is 10. If you want further control over connection pooling you probably need to create custom binding and set connectionPoolingSettings in tcpTransport binding element.
Ladislav Mrnka
@Ladislav thanks. A one more question. What is the default idle timeout on Tcp Connections and how can I change it?
mkus
Check this settings: http://msdn.microsoft.com/en-us/library/ms788984.aspx Idle timeout is time the unused connection waits in connection pool before it is disconnected. Default value is 2 minutes and as I understand it, it can be changed only in custom binding.
Ladislav Mrnka