Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

But many places in the internet (like this and this) say that only a single process can listen each port simultaneoulsy.

Are they wrong?

like image 973
Jader Dias Avatar asked Jan 14 '10 21:01

Jader Dias


1 Answers

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.

like image 117
Cheeso Avatar answered Nov 16 '22 00:11

Cheeso