场景:有一个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.

解决方案:

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

  

  

  2. 删除其中一个endpoint

An endpoint configuration section for contract "serviceReferenc.service" could not be loaded的更多相关文章

  1. Could not find default endpoint element that references contract 'wcfXXXXXXXXXXX' in the ServiceMode

    Service本身没有问题,但是调用的时候,只在DataAccessSilverlight里引用了,而在主工程WebGISDemo里没有引用服务PowerDataServiceReference,所以 ...

  2. .net 配置文件设计工具 Configuration Section Designer

    Configuration Section Designer 简称 CSD 下载及英文介绍地址点击我 以下为简单使用说明 选择自己需要的版本安装好该设计插件之后重启vs 新建选择 在工具栏里选择想使用 ...

  3. 遇到 Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section的解决办法

    用记事本编辑*.EXE.config,在“<system.net>”节点加入<defaultProxy> <proxy usesystemdefault="Fa ...

  4. 【ASP.NET】 Config Error: This configuration section cannot be used at this path.

    Config Error: This configuration section cannot be used at this path. This happens when the section ...

  5. Configuration Section Designer for VS2017

    Configuration Section Designer是在Visual Studio中设计符合.Net配置体系配置文件和代码的神器.然而,它的源码已经很久不维护了.现在在新的VS2017中无法使 ...

  6. [原]openstack-kilo--issue(四) WARNING: nova has no endpoint in ! Available endpoints for this service:

    本博客已经添加"打赏"功能,"打赏"位置位于右边栏红色框中,感谢您赞助的咖啡. 在安装kilo的时候出现了一个报错 nova endpoints WARNING ...

  7. The configuration section 'system.serviceModel' cannot be read because it is missing a section decla

    将Asp.Net 2.0的Web Site搭建在IIS7(7.5)上时,运行出现500.19错误, 错误提示为 The configuration section 'system.serviceMod ...

  8. ConfigurationErrorsException: Unrecognized configuration section system.data.

    报错 ConfigurationErrorsException: Unrecognized configuration section system.data. (C:\Users\luren\Sou ...

  9. IIS-This configuration section cannot be used at this path.

    Q:在IIS上部署web后,游览器打开报以下异常: This configuration section cannot be used at this path. This happens when ...

随机推荐

  1. Javascript诞生与历史

    基本常识 Brendan Eich在1995年4月入职Netscape Communications Corporation(网景通信公司).并于1995年5月用10天时间发明了Javascript. ...

  2. xen credit scheduler and policy

    最近在研究xen的vcpu 调度和cpu qos策略,现在默认的scheduler是credit, 对应的代码是sched_credit.c xen支持好几种控制策略,效果最好的当选pin, 灵活性最 ...

  3. 跨服务器备注SQL数据库 分类: SQL Server 2015-03-05 08:52 227人阅读 评论(0) 收藏

    任务:把服务器1上的SQL数据库自动备份到服务器2上,命名格式=数据库名+年月日+小时. 说明: 服务器2=>192.168.0.22 数据库名=>Book 共享文件夹路径:192.168 ...

  4. 关于win7右下角显示“音频服务未运行”的解决方法

    今天打开电脑发现右下角的的小喇叭多了个叉叉,显示“音频服务未运行”,百度了一下,解决方法还是挺多的,一下是百度到的解决方法,希望可以帮到出现这个问题的朋友们. 解决方法:(转载的) 1.Windows ...

  5. [Windows] Adobe Photoshop CC 2015官方原版下载 附破解补丁&破解教程

      Photoshop自CS6以后改为CC,目前Photoshop CC 2015是最新版,发布日期为2015年6月. <ignore_js_op> 下载安装主程序: 主程序及补丁下载地址 ...

  6. 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(2)-easyui构建前端页面框架[附源码]

    原文:构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(2)-easyui构建前端页面框架[附源码] 开始,我们有了一系列的解决方案,我们将动手搭建新系统吧. 用 ...

  7. String是java中的基本数据类型吗

    1. 首先String不属于8种基本数据类型,String是一个对象. 因为对象的默认值是null,所以String的默认值也是null:但它又是一种特殊的对象,有其它对象没有的一些特性. 2. Ja ...

  8. linux诡异的半连接(SYN_RECV)队列长度

    linux诡异的半连接(SYN_RECV)队列长度(一) >>转载请注明来源:飘零的代码 piao2010 ’s blog,谢谢!^_^>>本文链接地址:linux诡异的半连接 ...

  9. Struts2和Struts1的不同

    转载(没看懂) Action 类 ◆Struts1要求Action类继承一个抽象基类org.apache.struts.action.Action.Struts1的一个普遍问题是使用抽象类编程而不是接 ...

  10. java解析xml文件四种方式

    1.介绍 1)DOM(JAXP Crimson解析器) DOM是用与平台和语言无关的方式表示XML文档的官方W3C标准.DOM是以层次结构组织的节点或信息片断的集合.这个层次结构允许开发人员在树中寻找 ...