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>
<baseAddresses>
<add baseAddress="http://localhost:8001/"/>
<add baseAddress="net.tcp://localhost:8002/"/>
</baseAddresses>
</host>
本文转自 frankxulei 51CTO博客,原文链接:http://blog.51cto.com/frankxulei/320425,如需转载请自行联系原作者