WCF 错误:此集合已经包含方案 http 的地址。此集合中每个方案中最多只能包含一个地址。

解决方案:
在webservice的 web.config中system.serviceModel 标签下添加如下标签项。prefix内的值根据部署的网站ip、主机名、端口号会有所不同
<system.serviceModel>
<serviceHostingEnvironment>
<baseAddressPrefixFilters>
<add prefix="http://xxx.xx.xx.xx:8080"/>
</baseAddressPrefixFilters>
</serviceHostingEnvironment>
</system.serviceModel>
本文解决WCF错误提示:此集合已经包含方案http的地址,通过在webservice的web.config中系统服务模型标签下添加指定配置解决此问题。
906

被折叠的 条评论
为什么被折叠?



