在 WCF 中通过 net.pipe 运行多个服务 [英] Running Multiple Services Over net.pipe in WCF

查看:24
本文介绍了在 WCF 中通过 net.pipe 运行多个服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个需要 6 种不同服务的分布式应用程序.我必须使用 Visual Studio 2008 在 XP 笔记本电脑上演示该应用程序.

I am building a distributed application that will require 6 different services. I will have to demo the application on my XP laptop using Visual Studio 2008.

是否可以同时在 localhost 上运行多个服务,全部使用 net.pipe?

Is it possible to run multiple services on localhost at the same time, all using net.pipe?

例如:

net.pipe://localhost/DirectoryService
net.pipe://localhost/MathService

如果没有,有没有其他方法可以在不使用 IIS/webdev 服务器的情况下托管这些 WCF 服务?网络.tcp?还有什么?

If not, is there any other way to host these WCF services without using IIS/webdev server? net.tcp? Something else?

推荐答案

是的,前提是绑定地址是唯一的.您展示的两个示例适用于 net.pipe 绑定.

Yes, providing the binding addresses are unique. The two examples you've shown will work fine with the net.pipe binding.

请记住,net.pipe 绑定仅适用于本地机器.如果您希望可以从远程机器访问您的服务,则需要使用不同的绑定,例如 net.tcp.也就是说,如果您的服务在本地主机上运行,​​net.pipe 是推荐使用的绑定,因为它比其他绑定更有效.

Keep in mind the net.pipe binding will only work on the local machine. If you want your services to be accessible from remote machines, you'll need to use a different binding, such as net.tcp. That said, net.pipe is the recommended binding to use if your services run on the localhost because it is more efficient that the other bindings.

这篇关于在 WCF 中通过 net.pipe 运行多个服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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