I'm still learning all the work of WCF, so please carry me here.
I have two self-service services created using C # and VS 2008:
ServiC # 1 Adds two numbers and returns the result.
Service # 2 Returns the square of a number.
I want the client to be able to send two numbers to Service 1, get the amount, and then send the amount to Service 2 and get the square.
I have two generated proxies for both services, and I can use Intellisense on them, so the part supposedly works.
Now how do I configure the app.config file so that I can communicate with both services? Right now, I get an exception every time I try to do this.
[The client works fine if I have only one of the configurations in the application file at a time, and try to call only this server.]
I guess this is a very Nubian question, and the answer probably lies in “structuring the configuration file _____ way”, but Google just doesn't have an example / guide.
Does anyone know how to do this?
Note: Using multiple WCF services on the same client client Although it sounds like a duplicate, NOT what I'm looking for.
Edit: Thanks marc_s, I got his job
In both services running in different applications, I did not need to split the server configuration file, but here is what I did with the client configuration files: first I automatically generated the configuration files using SvrUtil.exe, and then combined them in this way:
<bindings> <wsHttpBinding> <binding> ... </binding> <binding> ... </binding> </wsHttpBinding> </bindings>
...
<endpoint>
...
Mostlyharmless
source share