1

I have created a WCF multiservice with two interfaces, i'm trying to export two endpoints one for each service. Here below you can see the two endpoints:

<service behaviorConfiguration="SAGBService_Behavior" name="SAGBService.SAGBService">
    <endpoint address="basic" binding="webHttpBinding" bindingConfiguration=""
      contract="SAGBService.ICalculeLactation" />
    <endpoint address="basic1" binding="webHttpBinding" bindingConfiguration=""
      contract="SAGBService.ISAGBService" />
  </service>

when i try to call the service i have and error telling me that the endpoint is not found.

[EndpointNotFoundException]: There was no channel actively listening at 'http://localhost:3197/SAGBService.svc/GetRapportTrimestiel/0/0/0/20150401/20150430&#39;. This is often caused by an incorrect address URI. Ensure that the address to which the message is sent matches an address on which a service is listening.

but when i remove the second endpoint, it works can access the functions on ICalculeLactation:

<service behaviorConfiguration="SAGBService_Behavior" name="SAGBService.SAGBService">
    <endpoint address="" binding="webHttpBinding" bindingConfiguration=""
      contract="SAGBService.ICalculeLactation" />
  </service>

the problem is that i'm interested in the fuctions that are on ISAGBService

abatishchev
  • 98,240
  • 88
  • 296
  • 433
cascadox
  • 893
  • 4
  • 14
  • 32
  • You have two endpoints for one service, try using them in separate services or possibly using the same contract for all of the functions. – Blue Eyed Behemoth May 12 '17 at 18:16
  • Does ICalculeLactation really provide an interface for calculations relating to secretion of milk by mammary glands? – jonnarosey Nov 12 '18 at 15:35

1 Answers1

3

I think the error says it: This is often caused by an incorrect address URI

Your endpoint has the address of "basic1", but the URL request does not include that address. http://localhost:3197/SAGBService.svc/GetRapportTrimestiel/0/0/0/20150401/20150430

vs

http://localhost:3197/SAGBService.svc/basic1/GetRapportTrimestiel/0/0/0/20150401/20150430

Mike_G
  • 16,237
  • 14
  • 70
  • 101