I've got a WCF service which has multiple clients that it connects to.
What I want to do is to create the clients dynamically the WCF services consumes.
Creating the clients by inheriting from the `ServiceFactory<TChannel>` class is done and very simple. What I'm struggling with is how to read Endpoint behaviours from the `web.config` file and add them to the clients?
BasicHttpBinding binding = new BasicHttpBinding(bindingConfigName);
EndpointAddress endpoint = new EndpointAddress(endpointUrl);
ChannelFactory<IShoppingSoap> clientEndpoint = new ChannelFactory<IShoppingSoap>(binding, endpoint);
base.Endpoint.Behaviors.Add(*Get the behavior from the config file*);
`Web.config` file :
<dataContractSerializer maxItemsInObjectGraph="2147483646" />
View Complete Post