Consider the following code which is typcial of many ChannelFactory examples:
WSHttpBinding myBinding = new WSHttpBinding();
EndpointAddress myEndpoint = new
The answer is already here, but it is spread over several comments and answers and not entirely clear, hence my answer.
Should one close the ChannelFactory as well as the Channel?
No. If you want to create multiple Channels from each ChannelFactory, you should dispose of the ChannelFactory, which will dispose all the Channels it created for you.
If you want to create one channel for each (endpoint, binding) pair, you should use this static function: ChannelFactory
(which avoids the issue as it does not create a second IDisposable), and you should dispose of the channel it returns.
Disposing of both the channelfactory and any of the channels it created will raise an ObjectDisposed exception.