首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式碼之家 >> 編程語言 >  >> .NET 網頁程式設計 >> 關於.NET

WCF 分散式開發常見錯誤 (5):Could Not Find Base Address Matching Scheme HTTP —— 缺少 baseAddresses 設定

     編輯:關於.NET

自託管宿主啟動失敗:「Could not find a base address that matches scheme http for the endpoint with binding MetadataExchangeHttpBinding」。設定檔補充 <host><baseAddresses>:

<service name="WCFService.WCFService">
  <host>
    <baseAddresses>
      <add baseAddress="https://localhost:8001/" />
      <add baseAddress="net.tcp://localhost:8002/" />
    </baseAddresses>
  </host>
  <endpoint ... />
</service>

確保每個端點繫結協定(http/tcp/pipe/msmq)皆有對應基底位址。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式碼之家 All Rights Reserved