我可以运行一个 Windows 服务托管的 WCF 服务监听 http://localhost:80/MyService
而 IIS 在 http://localhost:80
上提供页面并且两者都有效。
但是互联网上的很多地方(比如 this 和 this)都说只有一个进程可以同时监听每个端口。
他们错了吗?
最佳答案
HTTP.sys makes this possible .来自文章:
...because WCF and IIS 6.0 both use the kernel-mode HTTP stack (HTTP.sys), IIS 6.0 can share port 80 with other self-hosted WCF services running on the same machine...
HTTP.sys 充当端口转发服务,用于 HTTP(端口 80)流量。
关于wcf - WCF 服务如何监听与 IIS 相同的端口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2067830/