Search code examples
performancewcfwcf-binding

Channel Factory vs Service Proxy


When to use Channel Factory, and When to use Service Proxy in WCF?

My binding is NetNamedPipeBinding. and I'm planning to use a Duplex connection.


Solution

  • Channel Factory and Service Proxy are equal features for getting one aim - consume you service. Usually if you control service contract interface both on you client and server, you'd better use ChannelFactory, because it is managed more easier. If you manage only client part - Proxy is a way to go, because othewise you would not be able to control the changes, made on the server side. Besides Proxy gives you a nice tool of generating async methods for your service :)