How to consume multiple WCF services from one client?

If you want to run the two services on separate endpoints / ports, do something like this: Server-side: service name="Service1.

If you want to run the two services on separate endpoints / ports, do something like this: Server-side: Client-side: That should give you two separate, individual endpoints on the server and a client that will talk to both. Marc.

Thanks, that worked! There were so many permutations to merge the config files, that I just decided to ask, rather than cover all permutations :P – Mostlyharmless Apr 1 '09 at 15:53.

I realise you have asked for an App. Config answer but figure this might help. I would normally start by configuring the client connections programatically first, since it's simpler, and once you have got that working you could move it to your App.Config.

Here's an exmaple of how to configure a WCF client. BasicHttpBinding binding = new BasicHttpBinding(); EndpointAddress address = new EndpointAddress(serverURL); MyServiceClient myServiceProxy = new MyServiceClient(binding, address); You could then have something like the below in your App.Config.

Make sure that both services aren't configured to listen on the same port number for example. If you could post your config file (or a sanitised version of it) that would help.

I do have them both running on the same port, but I am able to call service A from Service B, both listening to port 8000. Suppose I do run them on different ports, how do I structure the app. Config?

– Mostlyharmless Mar 26 '09 at 15:51 Under you'd have multiple elements, and so on. You can't just copy both complete config sections, you have to merge them. – David M Mar 26 '09 at 16:28.

Multiple wcf services is consumed (without quotes):. Consume multiple WCF services.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions