如何实现在其他计算机上运行的wcf服务和客户端 [英] How can I implement wcf service and client running in other machines

查看:46
本文介绍了如何实现在其他计算机上运行的wcf服务和客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须拥有哪个baseaddress,或者我不知道以哪种方式执行此操作

解决方案

检查此链接有关WCF服务和客户端的详细信息。至于在不同机器上破坏WCF和客户端可以通过在machine1中部署WDF并在machine2上配置客户端来实现。对于此端点,客户端配置文件中的地址标记应引用machine1。请参阅客户端端点设置示例。



 <  配置 >  
< system.servicemodel >

< 客户 >
< ; 端点 >
name =
address = http://localhost/servicemodelsamples/service.svc
binding =basicHttpBinding
contract =Microsoft.ServiceModel.Samples.ICalculator/>
< / endpoint > < / client >

< bindings > ;
< basichttpbinding / >
< ; / bindings >

< / system.servicemodel >

< / configuration >





http://msdn.microsoft.com/en-us/library/ms731144(v=vs.110).aspx [ ^ ]


which baseaddress I must have, or I don't know in which way to do it

解决方案

Check this link which detail about WCF service and client. As far as ruining WCF and client on different machine can accomplished by deploying WDF in machine1 and configuring client on machine2. For this endpoint's address tag in client config file should reference to machine1. See client endpoint settings sample.

<configuration>
  <system.servicemodel>

    <client>
      <endpoint>
          name=""
          address="http://localhost/servicemodelsamples/service.svc" 
          binding="basicHttpBinding" 
          contract="Microsoft.ServiceModel.Samples.ICalculator" />
    </endpoint></client>

    <bindings>
      <basichttpbinding />
    </bindings>

  </system.servicemodel>

</configuration>



http://msdn.microsoft.com/en-us/library/ms731144(v=vs.110).aspx[^]


这篇关于如何实现在其他计算机上运行的wcf服务和客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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