Cannot start WebSite because port 80 is being used by W3SVC.exe

iis-7portservices

I have deverloped a website at work and we typically use port 80/443 for our websites (in development). This has worked well until today when starting the website gives me the error (IIS 7)

This Web site cannot be started. Another Web site may be using the same port.

Now I used netstat to find the process id (PID) holding that port 80:

netstat -o -n -a | findstr 0.0:80
TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4

Which gives me in the TaskManager

System    4   SYSTEM  00   56 K   NT Kernal & System

After a bit of goggling I see that it could be the "World Wide Web Publishing Service" which when stopped does clear the port 80 ownership.

However in doing so I am unable to start my website:

The World Wide Web Publishing Service (W3SVC) is stopped. Web sites cannot be started unless the World Wide Web Publishing Service (W3SVC) is running.

So now I have a chicken-egg issue where the W3SVC service needs to run to start the web-site yet it being on prevents the web-sites from starting. I don't want to change all application to use another port as that would require a bit of work and it was working yesterday.

Any ideas?

Best Answer

Try looking in IIS manager, right-clicking on the default web site and selecting Edit Bindings. Check that you don't have any extra/blank bindings to port 80. You may need to remove an empty binding.