views:

389

answers:

0

Hi,

I have read the other posts, but could find my answer. I'm trying to connect to a webservice. I'm not using the proxy generated app.config file, since I have diffrent servers where the webservice is on.

foreach (var item in list) { var binding = new WSHttpBinding();

var endpointAddress = new EndpointAddress(item.ServiceURL);

var channelFactory = new ChannelFactory(binding, endpointAddress);

var client = channelFactory.CreateChannel();

client.ClearCache();

channelFactory.Close(); }