首页 > 编程语言 > 详细

无法加载协定为“JavaWebService.UserInfoDelegate”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

时间:2014-12-15 21:37:07      阅读:262      评论:0      收藏:0      [点我收藏+]

原因是:

在vs 2008中使用C#,多次添加/删除服务引用后,app.config文件并不会自动修改,

在添加/删除后,会生成多个“endpoint”,手工删除即可。

app.config中的内容:

  <client>
             <endpoint address="http://localhost:8080/WebService/UserInfoPort"
                 binding="basicHttpBinding" bindingConfiguration="WeatherWebServiceSoap"
                 contract="Weather.WeatherWebServiceSoap" name="WeatherWebServiceSoap" />
   </client>

   <client>

      <endpoint address="http://localhost:8080/WebService/UserInfoPort"
                 binding="basicHttpBinding" bindingConfiguration="WeatherWebServiceSoap"
                 contract="Weather.WeatherWebServiceSoap" name="WeatherWebServiceSoap" />
             <endpoint address="http://localhost:8080/WebService/UserInfoPort2"
                 binding="basicHttpBinding" bindingConfiguration="WeatherWebServiceSoap"
                 contract="Weather.WeatherWebServiceSoap" name="WeatherWebServiceSoap" />
   </client>

 

无法加载协定为“JavaWebService.UserInfoDelegate”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

原文:http://www.cnblogs.com/lixiaolun/p/4165845.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!