场景:有一个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. Maven属性、profile和资源过滤

    Maven的六类属性 内置属性 主要有两个常用内置属性:${basedir}项目的根目录(包含pom.xml文件的目录),${version}项目版本 POM属性 用户可以使用该属性引用POM文件中对 ...

  2. Epoll之ET、LT模式

    Epoll之ET.LT模式 在使用epoll时,在函数 epoll_ctl中如果不设定,epoll_event 的event默认为LT(水平触发)模式. 使用LT模式意味着只要fd处于可读或者可写状态 ...

  3. javascript的执行顺序

    先看下面两段js程序,先是定义式函数写法: 复制代码 <script type="text/javascript"> function myfunc(){ alert( ...

  4. PMD使用手册

    文中测试例子均采用JHotDraw7源码,官网关于 JHotDraw的检测结果:http://pmd.sourceforge.net/reports/jhotdraw_JHotDraw.html 下载 ...

  5. DataFromFile

    #region Copyright 2013, Andreas Hoffmann // project location ==> http://datafromfile.codeplex.com ...

  6. mapreduce实战:统计美国各个气象站30年来的平均气温项目分析

    气象数据集 我们要写一个气象数据挖掘的程序.气象数据是通过分布在美国各地区的很多气象传感器每隔一小时进行收集,这些数据是半结构化数据且是按照记录方式存储的,因此非常适合使用 MapReduce 程序来 ...

  7. requireJS入门

    RequireJS 下载地址 : http://requirejs.org 什么是 requireJS ?以下是官方网站上的解释: RequireJS is a JavaScript file and ...

  8. 还在用ListView?

    还在用Lisview?RecyclerView都已经出来一年多了! 想必大家多或多或少的接触过或者了解过RecyclerView,为什么没有用起来,原因大概如下? ListView我用的挺好的,为什么 ...

  9. android开发之使用Messenger实现service与activity交互

    service与activity交互的方式有多种,这里说说使用Messenger来实现两者之间的交互. Service程序 public class MessengerService extends ...

  10. android 实现垂直的ProgressBar

    I had recently come across the need for a vertical progress bar but was unable to find a solution us ...