多服务器WCF服务的多主机托管,并可以从单个客户端访问 [英] Multipule hosting of WCF service in different servers and accessing from a single client

查看:82
本文介绍了多服务器WCF服务的多主机托管,并可以从单个客户端访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以通过使用WCF服务的ENDPoint地址,从Windows服务中与我如何与Windows服务器中的WCF服务通信,该服务可以在Windows Server中进行通信.

Could anyone help me on how I can communicate with a WCF service, hosted in multiple servers, from a Windows Service by using the ENDPoint address of the WCF service ...

推荐答案

将所有WCF服务的服务引用添加到Windows服务.您将获得所有服务的代理,使用该代理,您可以与WCF服务进行交互.

注意:如果在这种情况下无需添加服务引用来创建代理,则无需在端点处指定端点,Visual Studio会在配置文件中为您添加所有配置.
Add the service reference of all the WCF service to your windows service. You will get the proxy of all the services, using that proxy you can interact with the WCF service.

Note: If you create the proxy through adding the service reference in that case you don’t need to specify the endpoint at your end, visual studio adds all the configuration for you in your configuration file.


这篇关于多服务器WCF服务的多主机托管,并可以从单个客户端访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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