To some extent, it depends on your requirements. Opening a channel is expensive, relatively speaking. Best practice is for a class that makes remote calls to implement IDisposable, it should make a call to ClientFactory.CreateChannel once, use channels in all method calls and close the channel when calling the Dispose method. However, if the time between calls to methods invoking the remote service is long (longer than the default timeout on the channel, which is 10 minutes), then executing ClientFactory.CreateChannel is not particularly harmful, but I would say anyway it would be better to go along the IDisposable path and encapsulate the use of the class with the keyword "using"
source
share