原因是:

在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>

 

相关文章:

  • 2021-11-16
  • 2021-10-29
  • 2021-10-12
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
猜你喜欢
  • 2021-08-27
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案