简体   繁体   中英

How to call WCF Service on Local Machine

We have an environment where multiple WCF services are hosted on a single VM and (multiple VM in) server farm behind a fire wall. There are certain services that make calls to other services. Currently we call these services over http. The call gets routed to the load balancer, and each call is routed to any one of the VMs.

For performance reasons, we want to call service on local machine. If possible we want to avoid overhead of serialization and deserialization and directly call it (using MEF?). I would like to know how other people are handling this kind of situation.

Could you not just set up an additional endpoint for local machine.

NetNamedPipeBinding Class

"Provides a secure and reliable binding that is optimized for on-machine communication."

您必须将Web服务项目添加到本地计算机上,并在您的计算机上为其创建一个虚拟目录,并从代码中指向该目录,然后可以在本地指向它并进行调试。

您可以在本地计算机上启动服务并修改配置文件,以仅在调试模式下使用本地主机,在生产模式下使用生产VM。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM