由于HPC项目原因,需要windows服务共享一个绑定的443端口,作为备忘以供参考
我实验了不同应用下的端口共享情况,我的实验为:
IIS 部署hpcportal
WCF服务Proxy和Proxy1
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.