错误截图:

对比一下Web.config,下面这个是正常情况下的:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="PersonServiceSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://www.looog.com/personservice.asmx"
binding="basicHttpBinding" bindingConfiguration="PersonServiceSoap"
contract="PersonService.PersonServiceSoap" name="PersonServiceSoap" />
</client>
</system.serviceModel>
下面这个是,报错:
无法加载协定为“PersonService.PersonServiceSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="PersonServiceSoap" />
</basicHttpBinding>
<customBinding>
<binding name="PersonServiceSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://www.looog.com/personservice.asmx"
binding="basicHttpBinding" bindingConfiguration="PersonServiceSoap"
contract="PersonService.PersonServiceSoap" name="PersonServiceSoap" />
<endpoint address="http://www.looog.com/personservice.asmx"
binding="customBinding" bindingConfiguration="PersonServiceSoap12"
contract="PersonService.PersonServiceSoap" name="PersonServiceSoap12" />
</client>
</system.serviceModel>
对比可以看到,多了一个endpoint和一个bindings。删掉多余的代码,也就是更新成第一组之后就正常工作了!
Why?
因为在“更新/删除”服务引用时,app.config文件并不会自动修改,在“更新”或再次“加入”后,会生成两个同样的“endpoint”,需要手工删除掉多余的才能正常运行。