"Could not find default endpoint element that references contract "的解决

本文介绍了一个关于WCF客户端配置缺失导致的错误及其解决方法。当类库中配置了WCF客户端,但引用该类库的项目未进行相应配置时,会引发特定错误。文章详细解释了解决这一问题的具体步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

        最近项目中,在类库中引用wcf,报"Could not find default endpoint element that references contract 'ServiceReferenceReview.IReviewService' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element."的错误。

        上网查了下资料,发现时因为类库中配置了wcf客户端的终结点,但在引用类库的项目上,却没有配置。将配置信息,添加的项目配置文件中。问题解决。

        在此记录,以免以后遗忘解决方法。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值