Error while consuming one WCF Service (hosted on Windows Service) from another WCF Service (self hosted)

366 views Asked by At

I am hosting a WCF service on Windows Service (let's call it WCF B) and then trying to consume it from another WCF service (which is self hosted) (let's call it WCF A).

enter image description here

I am able to add service reference perfectly, end points are getting auto generated properly. But when I am trying to instantiate the client object.

I am communicating over TCP. I am getting following error.

Error Message, when I try to instantiate the client service object

Configuration Code of WCF B is as below

enter image description here

Auto generated Endpoint details(After adding Service Reference) in WCF A web.config are as below.

enter image description here

1

There are 1 answers

0
Wasif Subzwari On

We have to copy the endpoint details from our WCF A web.config and paste them into it's host (Console app.config in this case)

Information to be copy pasted is configuration which is auto generated after adding Service Reference.

enter image description here