您可以在单个 Windows 服务中托管多个 WCF 进程吗? [英] Can you host multiple WCF processes in a single windows service?

查看:30
本文介绍了您可以在单个 Windows 服务中托管多个 WCF 进程吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows 服务中托管了一个 WCF 进程.我想知道我是否可以安全地拥有多个 WCF 进程,这些进程可以在同一个 Windows 服务中托管不同的事情.我需要担心端口吗?我正在使用 mex 端点

I have a WCF process hosted in a windows service. I am wondering if I can safely have multiple WCF processes that do different things hosted in the same windows service. Do I have to worry about ports? I am using a mex endpoint

推荐答案

是的,你可以.我正在我的项目中做这件事,在我的 Windows 服务中托管三个独立的 WCF 服务.只需确保每个 WCF 端点,即地址/绑定/合同元组,都是唯一的.

Yes, you can. I am doing this exact thing in my project, hosting three separate WCF services inside my Windows service. Just make sure that each WCF endpoint, i.e., the address/binding/contract tuple, is unique.

这篇关于您可以在单个 Windows 服务中托管多个 WCF 进程吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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