如何在WCF中调用2个端点? [英] How do I call 2 endpoints in WCF ?

查看:121
本文介绍了如何在WCF中调用2个端点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <services>
      <service name="WCF_Prac1.Service1" behaviorConfiguration="WCF_Prac1.Service1">
        <endpoint name="Addition"  contract="WCF_Prac1.Interfaces.IAddition" binding="basicHttpBinding"> </endpoint>       
<pre><endpoint name="Substraction"  contract="WCF_Prac1.Interfaces.ISubstraction" binding="basicHttpBinding"> </endpoint>       









我的尝试:



1端点工作正常但是当我尝试添加2个端点时会抛出错误。





What I have tried:

1 endpoint works fine but when i try to add 2 endpoints it throws error.

推荐答案

XML不仅看起来有些狡猾,而且多个端点以某种方式以另一种方式完成。



看看这个微软的例子来理解它。
The XML looks not only somehow fishy, but multiple endpoints are done somehow in another manner.

Take a look at this Microsoft example to understand it.


这篇关于如何在WCF中调用2个端点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆