I am trying to get a better understanding of some of the inner workings of WCF. I have done a fair amount of looking around, but I have not been able to find a clear explanation of what ChannelFactory.Open()
does compared to IClientChannel.Open()
. What is the purpose of opening the factory? If the channel is being used for communication, what part does the factory play in the process after the channel has been created and opened?
The question was asked here, among other questions, but never answered directly.
EDIT:
After de-compiling the source code, I found some of the specific reasons why Open needs to be called on ChannelFactory, which is documented below.
What I'm still having trouble understanding is why this work is being done through mechanisms provided by the ICommunicationObject, when the factory isn't actually communicating with anything (as far as I know). Why not just handle these things when the object is constructed or disposed of?
I think I'm probably far enough in the weeds that such an answer may not be publicly available. Thank you to those who weighed in on the original question.