簡體   English   中英

正在獲取EndpointNotFoundException:WCF中沒有正在積極監聽的頻道

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

我創建了具有兩個接口的WCF多重服務,我試圖為每個服務導出兩個端點。 在下面,您可以看到兩個端點:

<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>

當我嘗試致電該服務時,出現錯誤並告訴我找不到端點。

[EndpointNotFoundException]:沒有在' http:// localhost:3197 / SAGBService.svc / GetRapportTrimestiel / 0/0/0/20150401/20150430&#39 ;活動的頻道 這通常是由不正確的地址URI引起的。 確保將消息發送到的地址與正在偵聽服務的地址匹配。

但是當我刪除第二個端點時,它可以訪問ICalculeLactation上的函數:

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

問題是我對ISAGBService的功能感興趣

我認為錯誤是這樣說的: This is often caused by an incorrect address URI

您的端點的地址為“ basic1”,但URL請求不包括該地址。 http://localhost:3197/SAGBService.svc/GetRapportTrimestiel/0/0/0/20150401/20150430

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