无法加载协定为“XXXWebServiceSoap”的终结点配置部分,因为找到了该协定的多个终结点配置

错误描述:无法加载协定为“XXXWebServiceSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

错误原因:该webservce在web.config里配置了两次:

<client>
<endpoint address="http://www.webxml.com.cn/WebServices/MobileCodeWS.asmx" binding="basicHttpBinding" bindingConfiguration="MobileCodeWSSoap1" contract="webserver.Mobile.MobileCodeWSSoap" name="MobileCodeWSSoap1"/>
<endpoint address="http://www.webxml.com.cn/WebServices/MobileCodeWS.asmx" binding="basicHttpBinding" bindingConfiguration="MobileCodeWSSoap1" contract="webserver.Mobile.MobileCodeWSSoap" name="MobileCodeWSSoap1"/>
</client>

处理方法:删除其中一个<endpoint>节点即可。

posted @ 2015-05-08 22:31  Jakin.zhou  阅读(3698)  评论(0编辑  收藏  举报