简体   繁体   English

正在获取EndpointNotFoundException:WCF中没有正在积极监听的频道

[英]Getting EndpointNotFoundException: There was no channel actively listening in WCF

I have created a WCF multiservice with two interfaces, i'm trying to export two endpoints one for each service. 我创建了具有两个接口的WCF多重服务,我试图为每个服务导出两个端点。 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 ;. [EndpointNotFoundException]:没有在' http:// localhost:3197 / SAGBService.svc / GetRapportTrimestiel / 0/0/0/20150401/20150430&#39 ;活动的频道 This is often caused by an incorrect address URI. 这通常是由不正确的地址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: 但是当我删除第二个端点时,它可以访问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 问题是我对ISAGBService的功能感兴趣

I think the error says it: This is often caused by an incorrect address URI 我认为错误是这样说的: 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. 您的端点的地址为“ basic1”,但URL请求不包括该地址。 http://localhost:3197/SAGBService.svc/GetRapportTrimestiel/0/0/0/20150401/20150430

vs

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM