1
net.tcp 연결 풀링을 해제해야하는 특정 시나리오가 있습니다. 이상적인 구성이 아니라는 것을 알고 있지만, 특정 환경에서 문제를 해결하기 위해 임시로해야합니다.WCF net.tcp 바인딩에 대한 연결 풀링을 사용하지 않음
누구나 connection reuse \ pooling을 사용하지 못하게하는 net.tcp 바인딩 구성의 예를 제공 할 수 있습니까?
net.tcp 연결 풀링을 해제해야하는 특정 시나리오가 있습니다. 이상적인 구성이 아니라는 것을 알고 있지만, 특정 환경에서 문제를 해결하기 위해 임시로해야합니다.WCF net.tcp 바인딩에 대한 연결 풀링을 사용하지 않음
누구나 connection reuse \ pooling을 사용하지 못하게하는 net.tcp 바인딩 구성의 예를 제공 할 수 있습니까?
다음은 코드에서 수행 한 작업입니다. 여기
NetTcpBinding tbinding = new NetTcpBinding(SecurityMode.None, true);
// set some stuff on the binding ...
// ...
BindingElementCollection bElementCol = tbinding.CreateBindingElements();
TcpTransportBindingElement transport = bElementCol.Find<TcpTransportBindingElement>();
transport.ConnectionPoolSettings.IdleTimeout = TimeSpan.Zero;
transport.ConnectionPoolSettings.LeaseTimeout = TimeSpan.Zero;
transport.ConnectionPoolSettings.MaxOutboundConnectionsPerEndpoint = 0;
CustomBinding customBinding = new CustomBinding();
customBinding.Elements.AddRange(bElementCol.ToArray());
customBinding.Name = "NetTcpBinding";
// use customBinding instead of tbinding
은 나에게 도움이 몇 가지 링크입니다 :
How to set the leaseTimeout setting programmaticaly?
http://plainoldstan.blogspot.ca/2007/09/nettcpbinding-to-custombinding.html