We have a requirement to call a WCF service from another WCF Service. To test this I build a sample console application to display a simple string. The setup is: Console App -> WCF Service 1 -> WCF Service 2 Console App calls a method of service 1 and the service 1 method eventually calls service 2 method to return a string. I am able to call Console -> Service 1 but Service 1 -> Service 2 is not working. It throws an exception: "Could not find default endpoint element that references contract 'ITestService2' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element." To accomplish this,
1. I have created a service2, compiled and then created a proxy class and app.config. 2. I created service1, copied service2.cs(proxy) and app.config, created an object of service2 and called service2's menthod.
3. I created a console application, copied the service1.cs (proxy) and app.config, called service1's method.
Do I need to specify any link in app.config of service1 to service2? but how?
the app.config files for service1 and service2 are: