ylbtech-Error-ASP.NET:无法加载协定为“YlbService.MMSHServicesSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。 
1.返回顶部
1、

“/”应用程序中的服务器错误。


无法加载协定为“YlbService.MMSHServicesSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息:
System.InvalidOperationException:
无法加载协定为“YlbService.MMSHServicesSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

源错误:

行 754:    public partial class MMSHServicesSoapClient : System.ServiceModel.ClientBase<WebApp66.YlbService.MMSHServicesSoap>, WebApp66.YlbService.MMSHServicesSoap {
行 755:
行 756: public MMSHServicesSoapClient() {
行 757: }
行 758:

源文件:
C:\Users\Administrator\source\repos\Solution3\WebApp66\Connected
Services\YlbService\Reference.cs    行: 756

堆栈跟踪:

[InvalidOperationException: 无法加载协定为“YlbService.MMSHServicesSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。]
System.ServiceModel.Description.ConfigLoader.LookupChannel(ContextInformation configurationContext, String configurationName, ContractDescription contract, EndpointAddress address, Boolean wildcard, Boolean useChannelElementKind, ServiceEndpoint& serviceEndpoint) +463
System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address) +89
System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress) +129
System.ServiceModel.ConfigurationEndpointTrait`1.CreateSimplexFactory() +12901039
System.ServiceModel.ConfigurationEndpointTrait`1.CreateChannelFactory() +19
System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait) +18
System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef() +368
System.ServiceModel.ClientBase`1..ctor() +295
WebApp66.YlbService.MMSHServicesSoapClient..ctor() in C:\Users\Administrator\source\repos\Solution3\WebApp66\Connected Services\YlbService\Reference.cs:756
WebApp66.WebForm1.btnAttachmentInfo_Click(Object sender, EventArgs e) in C:\Users\Administrator\source\repos\Solution3\WebApp66\WebForm1.aspx.cs:74
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9782378
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +204
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +12
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +15
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1639


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3062.0  
2、
2.返回顶部
1、解决方法
删除 Web.config 中多余的节点
1.1 删除前
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="MMSHServicesSoap" />
</basicHttpBinding>
<customBinding>
<binding name="MMSHServicesSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://10.246.132.39:8888/MMSHServices.asmx"
binding="basicHttpBinding" bindingConfiguration="MMSHServicesSoap"
contract="YlbtechService.MMSHServicesSoap" name="MMSHServicesSoap" />
<endpoint address="http://10.246.132.39:8888/MMSHServices.asmx"
binding="customBinding" bindingConfiguration="MMSHServicesSoap12"
contract="YlbtechService.MMSHServicesSoap" name="MMSHServicesSoap12" />
</client>
</system.serviceModel>
</configuration>

1.2 删除后

<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="MMSHServicesSoap" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://10.246.132.39:8888/MMSHServices.asmx"
binding="basicHttpBinding" bindingConfiguration="MMSHServicesSoap"
contract="YlbtechService.MMSHServicesSoap" name="MMSHServicesSoap" />
</client>
</system.serviceModel>
</configuration>
2、
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

Un-Error-ASP.NET:无法加载协定为“YlbService.MMSHServicesSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。的更多相关文章

  1. webservice 错误::无法加载协定为的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

    转自网络 错误::无法加载协定为“ServiceReference1.INetbankUpdateService”的终结点配置部分,因为找到了该协定的多个终结点配置.请按名称指示首选的终结点配置部分. ...

  2. Web Service无法加载协定为“ServiceReference1.xxxxxx”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分

    Web Service 无法加载协定为“ServiceReference1.xxxxxx”的终结点配置部分,因为找到了该协定的多个终结点配置.请按名称指示首选的终结点配置部分   原因是在web.co ...

  3. 无法加载协定为“ServiceReference1.ReportWsSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

    前言 引用websevice时,有时会出现如下错误: 异常详细信息: System.InvalidOperationException: 无法加载协定为“ServiceReference1.Repor ...

  4. 【.NET】无法加载协定为“ServiceReference1.ReportWsSoap”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

    前言 引用websevice时,有时会出现如下错误: 异常详细信息: System.InvalidOperationException: 无法加载协定为“ServiceReference1.Repor ...

  5. 无法加载协定为xx的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

    当在vs 2008中添加服务引用后,如果"更新"服务引用,或"删除"该服务引用后再次加入后,在运行时会出现此错误.这是因为在"更新/删除"服 ...

  6. 无法加载协定为“NM3.IClrService”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分

    <binding name="NetTcpBinding_IClrService1" receiveTimeout="00:10:00" sendTime ...

  7. 无法加载协定为“ServiceReference1.xxxxx”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分

    原因是config节点中有多个endpoint相同节点,提示按名称指示首选的终结点,说明程序不知道选那个节点. 解决办法,实例化service服务对象时,通过name值指定创建它. config文件部 ...

  8. System.InvalidOperationException: 无法加载协定为“ServiceReference1.XXXXXXXXXXXXXXXX”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

    <system.serviceModel> <bindings> <basicHttpBinding> <binding name="testWeb ...

  9. 无法加载协定为“ServiceReference1.xxxxxx”的终结点配置部分,因为找到了该协定的多个终结点配置。请按名称指示首选的终结点配置部分。

    原因是在web.config 文件中多次引用了“添加外部引用” <system.serviceModel> <bindings> <basicHttpBinding> ...

随机推荐

  1. fiddler模拟弱网测试

    1.首先设置手机代理 设置手机代理到本机ip,端口号8888(Fiddler默认设置): 手机访问http://ip:port安装Fiddler证书 2.修改fiddler配置 勾选上后,已经开始限速 ...

  2. 机器学习笔记7:矩阵分解Recommender.Matrix.Factorization

    目录 1矩阵分解概述 1.1用在什么地方 1.2推荐的原理 2矩阵分解的原理 2.1目标函数 2.2 损失函数 2.3 通过梯度下降的方法求得结果 3 代码实现 参考地址: 贪心学院:https:// ...

  3. lua redis接口 (在ubuntu16.04 环境下配置lua-redis开发环境)

    目前成功的lua版本是5.1, 根据网络上的资料显示 lua5.1能够支持 lua-socket 安装lua及相关软件: #安装lua5. #安装lua-socketxiangg sudo apt i ...

  4. 201671010438王奕晗实验十四 团队项目评审&课程学习总结

    个人学习总结博客 项目 内容 这个作业属于哪个课程 任课教师博客主页链接 这个作业的要求在哪里 作业链接地址 作业学习目标 完成个人软件心得总结 一.结合本学期课程学习内容,对比<实验一 软件工 ...

  5. 品优购项目 单表过程 乒乓过程 入口 MyBatis逆向工程 dubbo框架搭建 品牌表CRUD bug集锦

  6. Weltanschauung--世界观是人类知觉的基础架构

    世界观(德文:Weltanschauung)意思是「著眼世界之上」.这是德国知识论中所使用的语言,指的是一个「广泛世界的观念」. 它指涉的是一种人类知觉的基础架构,透过它,个体可以理解这个世界并且与它 ...

  7. 【C/C++】指针

    指针定义 指针是一个变量,其值为另一个变量的地址,即,内存位置的直接地址.就像其他变量或常量一样,必须在使用指针存储其他变量地址之前,对其进行声明.指针变量声明的一般形式为: type *var-na ...

  8. yolov3

    YOLOv3没有太多的创新,主要是借鉴一些好的方案融合到YOLO里面.不过效果还是不错的,在保持速度优势的前提下,提升了预测精度,尤其是加强了对小物体的识别能力(yolov1在这方面是有缺陷的). 本 ...

  9. .Net 下基于Redlock redis 分布式锁实现

    Redlock-cs (C#/.NET implementation). RedLock.net (C#/.NET implementation). Includes async and lock e ...

  10. 04-树5 Root of AVL Tree (25 分)

    An AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child sub ...