在本地托管 WCF [英] Hosting WCF locally

查看:24
本文介绍了在本地托管 WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用可访问的 netTcpBinding 托管 WCF 服务吗(请注意,我问的是 ACCESSIBLE 意味着可浏览)在同一台机器 (localhost) 中而不是在 localhost 之外......甚至不是 Intranet.

Can I host a WCF Service using netTcpBinding which is accessible (please note i am asking about ACCESSIBLE means browsable) in the same machine (localhost) and not outside the localhost... not even intranet.

推荐答案

根据 Henk Holterman 的建议

As suggested by, Henk Holterman

NetNamedPipeBinding 是我们在 loaalhost 内托管服务的最佳方法,并且该服务只需要进程内通信,例如与同一台机器中的另一个 WCF 通信,或者说同一台机器中存在 .Net 客户端......

NetNamedPipeBinding is the best approach when we host the service inside a loaalhost and the service requires just intra process communication like communication with another WCF in the same machine or say a .Net client present in the same machine...

同样,netNamedPipeBinding 使通信速度更快,因为

Again, netNamedPipeBinding makes the communication faster because

1) 序列化以二进制格式进行2) 与我们通过端口通信的 netTcpBinding 不同,netNamedPipebinding 使用命名管道在进程之间进行通信.

1) Serialization takes place in binary format 2) unlike netTcpBinding where we communicate through a Port, netNamedPipebinding uses named pipes to communicate between process.

谢谢.苏拉

这篇关于在本地托管 WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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