您的位置:首页 > 理论基础 > 计算机网络

什么条件下IIS与WCF服务可以共享一个端口?

2011-10-08 11:52 387 查看
由于HPC项目原因,需要windows服务共享一个绑定的443端口,作为备忘以供参考

我实验了不同应用下的端口共享情况,我的实验为:

IIS 部署hpcportal

WCF服务Proxy和Proxy1

1 port 443 部署 IIS (https://192.168.50.5/hpcporta) 和Proxy(https://192.168.50.5/WindowsHpc/RD-LIUYY1/jobs) 和Proxy1(https://192.168.50.5/WindowsHpc1/RD-LIUYY1/jobs),
结果正常访问,互不影响

2 port  443 部署Proxy(https://192.168.50.5/WindowsHpc/RD-LIUYY1/jobs) 和Proxy1(https://192.168.50.5/WindowsHpc/RD-LIUYY1/jobs), Proxy1无法共享端口。

疑问:

    一个process只能listento 一个port,为什么可以与IIS共享?

原因分析:

    由于WCF和IIS都是基于The HTTP.SYS model,只要保证域名后的相对路径(/hpcporta和/WindowsHpc)不同就不会影响,因此1 work well, 2 failed

(出处:http://msdn.microsoft.com/en-us/library/ms734772.aspx)

The ability to share ports across multiple HTTP applications has long been a feature of Internet Information Services (IIS). However, it was only with the introduction of HTTP.SYS (the kernel-mode HTTP protocol listener) with IIS 6.0 that this infrastructure
was fully generalized. In effect, HTTP.SYS allows arbitrary user processes to share the TCP ports dedicated to HTTP traffic. This capability allows many HTTP applications to coexist on the same physical machine in separate, isolated processes while sharing
the network infrastructure required to send and receive traffic over TCP port 80. The Net.TCP Port Sharing Service enables the same type of port sharing for net.tcp applications.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐