您的位置:首页 > Web前端

An endpoint configuration section for contract "serviceReferenc.service" could not be loaded

2013-12-04 17:41 519 查看
场景:有一个WCF应用,添加服务引用后,自动生成一个app.config文件,当调用WCF时,它抛出一个错误:

An endpoint configuration section for contract 'ServiceReference1.Service' could not be loaded because more than one endpoint configuration for that contract was found. Please indicate the preferred endpoint configuration section by name.

解决方案:

打开app.config文件,你可以看到<client> 标签下有2 个endpoint (因为你的WCF配置文件里定义了2个endpoint, 如果在WCF 配置文件里删除一个endpoint, 此时添加服务引用后它将生成一个)

  


  

  2. 删除其中一个endpoint
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: