WCF分布式开发常见错误(5)Could not find a base address that matches scheme

WCF分布式应用开发,托管宿主配置终结点错误:找不到匹配式样http的基地址,
Could not find a base address that matches scheme http for the endpoint with binding MetadataExchangeHttpBinding. Registered base address schemes are [].
如图:
解决办法:打开托管宿主配置文件,添加基地址节点,与配置文件里终结点地址一致即可。
           <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8001/"/>
            <add baseAddress="net.tcp://localhost:8002/"/>
          </baseAddresses>
        </host>

你可能感兴趣的:(分布式,Scheme,base,Address,could)