How can a WCF service listen the same port as IIS?

前端 未结 2 955
野性不改
野性不改 2020-12-03 17:52

I could run a Windows Service hosted WCF service listening http://localhost:80/MyService while IIS was serving pages on http://localhost:80 and bot

2条回答
  •  执念已碎
    2020-12-03 18:19

    HTTP.sys makes this possible. From the article:

    ...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 acts as a port-forwarding service, for HTTP (port 80) traffic.

提交回复
热议问题