An endpoint configuration section for contract "serviceReferenc.service" could not be loaded
场景:有一个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
An endpoint configuration section for contract "serviceReferenc.service" could not be loaded的更多相关文章
- Could not find default endpoint element that references contract 'wcfXXXXXXXXXXX' in the ServiceMode
Service本身没有问题,但是调用的时候,只在DataAccessSilverlight里引用了,而在主工程WebGISDemo里没有引用服务PowerDataServiceReference,所以 ...
- .net 配置文件设计工具 Configuration Section Designer
Configuration Section Designer 简称 CSD 下载及英文介绍地址点击我 以下为简单使用说明 选择自己需要的版本安装好该设计插件之后重启vs 新建选择 在工具栏里选择想使用 ...
- 遇到 Error creating the Web Proxy specified in the 'system.net/defaultProxy' configuration section的解决办法
用记事本编辑*.EXE.config,在“<system.net>”节点加入<defaultProxy> <proxy usesystemdefault="Fa ...
- 【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 ...
- Configuration Section Designer for VS2017
Configuration Section Designer是在Visual Studio中设计符合.Net配置体系配置文件和代码的神器.然而,它的源码已经很久不维护了.现在在新的VS2017中无法使 ...
- [原]openstack-kilo--issue(四) WARNING: nova has no endpoint in ! Available endpoints for this service:
本博客已经添加"打赏"功能,"打赏"位置位于右边栏红色框中,感谢您赞助的咖啡. 在安装kilo的时候出现了一个报错 nova endpoints WARNING ...
- 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 ...
- ConfigurationErrorsException: Unrecognized configuration section system.data.
报错 ConfigurationErrorsException: Unrecognized configuration section system.data. (C:\Users\luren\Sou ...
- 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 ...
随机推荐
- K倍动态减法游戏
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2580 #include <iostream> #include <string.h> ...
- cocos2d&cocos2dx学习资源
汇总一下自己学习Cocos2d和cocos2dx认为比較好的一些资源: 书籍: <iPhone&iPad cocos2d游戏开发实战> Steffen Itterheim < ...
- PHP面向对象之旅:抽象类继承抽象类(转)
可以理解为对抽象类的扩展 抽象类继承另外一个抽象类时,不用重写其中的抽象方法.抽象类中,不能重写抽象父类的抽象方法.这样的用法,可以理解为对抽象类的扩展. 下面的例子,演示了一个抽象类继承自另外一个抽 ...
- SystemTap----常用变量、宏、函数和技巧
http://blog.csdn.net/moonvs2010/article/category/1570309
- Xcode常见报错及解决办法
报错一: 在iOS7的真机运行时,弹出错误:App installation failed. There was an internal API error. 如图 解决办法: 在Xcode -> ...
- C#中关于webconfig的读写
近期一个小网站需要一个计数的信息 偷懒不想用别的什么方法 原本想用个xml 无奈不太会使 虽然不推荐这种方法 不过还是记下来方便日后查看 webconfig信息 <?xml version=&q ...
- (转)Smarty Foreach 使用说明
foreach 是除 section 之外处理循环的另一种方案(根据不同需要选择不同的方案). foreach 用于处理简单数组(数组中的元素的类型一致),它的格式比 section 简单许多,缺点是 ...
- OpenGL ES 3.0 点,线,三角形绘制形式总结
OpenGL ES 3.0 顶点 -1, 1, 0, -0.5f, 0, 0, 0, -1, 0, -1, 0, 0, 0.5f, 0, 0, 1, -1, ...
- angularjs google map markers+ ui-gmap-windows --->增加click 事件
jsp: <div class="modal-body viewOnMap"> <div class="cboxClose" ng-click ...
- mysql 安装-编码
mysql的安装过程相对较为简单,在这里就不阐述,我想说的问题是,关于编码的安装, 在安装到达'Please select the default character set'的时候,选择'Manul ...