Reputation: 368
I have an IIS server running a website which uses port 80 and I also have an app which communicates from another computer via port 80. Is there anyway to run both of them on port 80?
The only reason my app uses port 80 to listen to tcplistener is because port 80 is open by default on client's firewalls.
Thanks, Rohit
Upvotes: 0
Views: 1626
Reputation: 887
You would need to bind your computer's NIC with two IP addresses. Then you application can listen to the port 80 on the one IP address and the IIS can listen on the other IP address. You'll have to configure IIS to bind to the specific IP address; rather than the default "All Unassigned."
But otherwise IP:Port bindings must be unique per listener.
For configuring IIS 7 site bindings see TechNet IIS Binding.
Upvotes: 0
Reputation: 48310
You cannot have more than one process listening on the same port at the same IP address. If your server has more than one network interface, you can set IIS to listen on one address and your own app to listen on the other.
If your server has only one network address you'll need to choose another port. 443 is a good choice if your IIS implementation doesn't listen for HTTPS traffic. Other options might be 21 (FTP), 22 (SSH), 23 (telnet), or 25 (SMTP).
Upvotes: 1