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 ...
随机推荐
- CentOS7.0分布式安装HADOOP 2.6.0笔记-转载的
三台虚拟机,IP地址通过路由器静态DHCP分配 (这样就无需设置host了). 三台机器信息如下 - 1. hadoop-a: 192.168.0.20 #master 2. ha ...
- Java多线程实现简单的售票程序
设计一个多线程程序如下:设计一个火车售票模拟程序.假如火车站要有100张火车票要卖出,现在有5个售票点同时售票,用5个线程模拟这5个售票点的售票情况 1.要求打印出每个售票点所卖出的票号 2.各售票点 ...
- C基础
一.关于整型数据 1.整型常量:十进制数前面可以加+.-号,但是不能有前缀0 八进制数:必须以前缀0开头,不是O.不能加负号(-),否则不能识别. 十六进制数:前缀必须为0x或者0X.不能加负号(-) ...
- Python - 元组(tuple) 详解 及 代码
元组(tuple) 详解 及 代码 本文地址: http://blog.csdn.net/caroline_wendy/article/details/17290967 元组是存放任意元素集合,不能修 ...
- SVN太旧,要更新问题
同步或者提交的时候出现问题提示 The working copy needs to be upgradedsvn: Working copy 'E:\JAVA\Workspaces\uhr' is t ...
- hdu 4742 Pinball Game 3D 分治+树状数组
离散化x然后用树状数组解决,排序y然后分治解决,z在分治的时候排序解决. 具体:先对y排序,solve(l,r)分成solve(l,mid),solve(mid+1,r), 然后因为是按照y排序,所以 ...
- C# 该行已经属于还有一个表 的解决方法
产生错误的代码: DataTable dtContract_src = Oper.GetDataTable("select * from T_Contract where ProjectID ...
- Objective-C中的@Property详解
Objective-C中的@Property详解 @Property (属性) class vairs 这个属性有nonatomic, strong, weak, retain, copy等等 我把它 ...
- UIPickView的简单介绍
UIPickView的简单介绍 设置UIPickView的时候,我们主要需要设置一下下面的两个属性 UIPickerView *pickView1; pickView1 = [[UIPickerVie ...
- C# WinForm获取程序所在路径方法
多个获取WinForm程序所在文件夹路径的方法,收藏备忘. 1)获取当前进程的完整路径,包含文件名(进程名). 代码:string str =this.GetType().Assembly.Locat ...