在 ServiceModel 客户端配置部分中,找不到引用协定“IpsBarcode.ScanService”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。
一个类库引用了web service A,用另一个EXE做承载时,访问这个web service A时就提示:“在 ServiceModel 客户端配置部分中,找不到引用协定“IpsBarcode.ScanService”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。”
解决:把类库的App.config中<system.serviceModel>节点下的<bindings>和<client>配置节复制到EXE程序的App.config中(WindowsFormsHost.exe.config):
<?xml version="1.0" encoding="utf-8" ?>
<configuration> <system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="WSOrderQuerySoapBinding" />
<binding name="WSRefundSoapBinding" />
<binding name="WSScanSoapBinding" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://newpay.ips.com.cn:80/psfp-entry/services/order"
binding="basicHttpBinding" bindingConfiguration="WSOrderQuerySoapBinding"
contract="IpsOderQuery.OrderQueryService" name="WSOrderQuerySoap" />
<endpoint address="http://newpay.ips.com.cn:80/psfp-entry/services/refund"
binding="basicHttpBinding" bindingConfiguration="WSRefundSoapBinding"
contract="IpsRefund.RefundService" name="WSRefundSoap" />
<endpoint address="http://thumbpay.e-years.com/psfp-webscan/services/scan"
binding="basicHttpBinding" bindingConfiguration="WSScanSoapBinding"
contract="IpsBarcode.ScanService" name="WSScanSoap" />
</client> </system.serviceModel> </configuration>
在 ServiceModel 客户端配置部分中,找不到引用协定“IpsBarcode.ScanService”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。的更多相关文章
- 在 ServiceModel 客户端配置部分中,找不到引用协定“WebServiceTest.WebServiceSoap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素
原文 http://blog.csdn.net/bugdemo/article/details/9083497 主题 技术 在引用WebService后,程序运行到实例化WebService时报错, ...
- 在 ServiceModel 客户端配置部分中,找不到引用协定“WebServiceSoap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素找不到与此协定匹配的终结点元素(转)
按语: 在项目中实现自动升级过程,在类库中调用webservice取升级update.xml文件,添加服务调用,但在类库中调用时就出现异常,但在简单的测试工程中没有问题.解决方法采用下面介绍的方法 在 ...
- 在 ServiceModel 客户端配置部分中,找不到引用协定“myservice.Service1Soap”的默认终结点元素。这可能是因为未找到应用程序的配置文件,或者是因为客户端元素中找不到与此协定匹配的终结点元素。
在做项目的时候遇到这个问题,当我在web网站中引用webservice时,很正常,但是当我在一个类库里引用并调用webservice方法后,然后网站调用这个类库里的方法,就会报标题这样的错误.最后纠结 ...
- MacOs 10.14.3 Matlab2018b 解决“找不到已安装的编译器 'Xcode Clang++'。错误使用mex,未找到合适的编译器”问题
这是目前网上state of the art 的解决方案: 最开始用的是matlab2017,结果爆了这么一个问题“找不到已安装的编译器 'Xcode Clang++'.错误使用mex,未找到合适的编 ...
- 未找到导入的项目,请确认 <Import> 声明中的路径正确
当使用vs出现下列情况: D:\xxxx\Web\Web.csproj : error : 无法读取项目文件“Web.csproj”. D:\xxxx\WebServiceManager\Web\W ...
- vs未找到导入的项目,请确认 <Import> 声明中的路径正确
当使用vs出现下列情况: D:\xxxx\Web\Web.csproj : error : 无法读取项目文件“Web.csproj”. D:\xxxx\WebServiceManager\Web\W ...
- 在 ServiceModel 客户端配置部分中,找不到引用协定“PmWs.PmWebServiceSoap”的默认终结点元素
System.Exception: ConfigManager.LoadConfigurationFromDb ServiceFactory.GetPmWebService 在 ServiceMode ...
- 在 ServiceModel 客户端配置部分中,找不到引用协定“XX”的默认终结点元素的解决方法
今天在CRM2011中写Plugin的的时调用WCF报错,错误如下:"在 ServiceModel 客户端配置部分中,找不到引用协定"XX"的默认终结点元素.这可能是因为 ...
- 类库文件引用web服务报错解决方法-在 ServiceModel 客户端配置部分中,找不到引用协定的默认终结点元素
由于需求,需要改造原有应用,因原有应用是写在console下面的,现在需要开放至web下, 想到BIZ层应用代码都是一样的,又不想在web下在添加引用,而重复写代码,故将原有的console下的服务和 ...
随机推荐
- Python学习笔记第十五周
目录: 一.CSS补充 1.position 2.overflow 3.hover 4.background 二.JavaScript 三.DOM 主要内容: 一.CSS补充 1.position 可 ...
- nginx 重定向与反向代理
server{ listen 80; server_name dianxi.test.net; #将地址重定向为新的ip地址 #rewrite "^/env ...
- 防止sql注入的函数addslashes()
<?php $str = addslashes('Shanghai is the "biggest" city in China.'); echo($str); ?> ...
- linux 的压缩 打包
1.压缩打包,常见的命令:gzip bzip2 xz zip tar gzip: 不能压缩目录 gip -[0-9] file_name 压缩级别, 默认是6 gzip file_nane ...
- libsvm使用总结
./tools/ subset.py 分割数据集 grid.py 优化参数c.g checkdata.py 检测数据集格式 easy.py 综合 ./windows/ svm-scale ...
- da shu mo ban
#include<bits/stdc++.h> using namespace std; ;/*精度位数,自行调整*/ //1.如果需要控制输出位数的话,在str()里面把len调成需要的 ...
- vue项目的创建
https://jingyan.baidu.com/article/456c463b359e630a5931444e.html
- Go Example--协程
package main import "fmt" func main() { //main gorouting中调用f函数 f("direct") //重新建 ...
- LeetCode - Partition Labels
A string S of lowercase letters is given. We want to partition this string into as many parts as pos ...
- WCF 学习总结5 -- 消息拦截实现用户名验证(转)
WCF建立在基于消息的通信这一概念基础上.通过方法调用(Method Call)形式体现的服务访问需要转化成具体的消息,并通过相应的编码(Encoding)才能通过传输通道发送到服务端:服务操作执行的 ...