Just had an IM chat with Ralph about the channels, factories and address issue.
So it looks like the part in that blog post which describes how to use a ClientBase-based proxy is not 100% correct.
If you actually use a ClientBase proxy, repoint it, and reuse it again, you are in a mess. The proxy thinks it was repointed.
The key here is that we can repoint ClientBase proxies until they get used. Because when they are used, they call ChannelFactory.CreateChannel underneath and that fixes the channel stack. Then the proxy is what it is.
OK, maybe in the future, the WCF guys should throw an exception when it happens, when a developer tries to do this. Right now, it let's us think we repointed to a new address when we didn't...
I am sure Ralph will come up with a nice code sample which explains all this - Ralph...? :)
OK, Christian, there's your code. :-)
Posted by: Ralph Squillace | 01/10/2006 at 09:31 AM