I'm a little unclear on what the proper way is to use DuplexChannelFactory in WCF. Following from convention, I have explicit Connect/Disconnect methods on my service contract to aid in management of the proxies, but I'm a little unclear as to what the client should be doing.
Here's my impression of how things work. When initiating the first connection, the client creates a DuplexChannelFactory.
From there, the client calls CreateChannel to create a proxy object. That proxy object must be managed while the client still wishes to receive callbacks, because when it's disposed the server will receive an ObjectDisposedException upon executing the callback operation.
The client then calls connect to explicitly open the channel to the service, and to allow the service to create and manage its own proxy back to the client. Also, I know that this isn't strictly necessary, but it's been recommended for symmetry with the Disconnect method.
Eventually, the client calls Disconnect, causing the server to dispose of its callback proxy, and then disposes of its proxy to the server. Normal day at the office.
Now, assume some fault somewhere in the middle. Is it enough simply to create a new channel from the same factory and call connect again? Does an entirely new factory need to be made? I'm unclear as to why factories have Close methods on them, for example.
What a normal way of dealing with things like this?