Windows: Port 80 is already in use

I wanted to start the Apache web server using XAMPP and got an error message that port 80 was already in use. My first thought was that IIS might be running on port 80. But on this machine I hadn’t installed IIS. So I executed the following to check which process might be using it:

c:\> netstat -nabo
  TCP    [::]:80                [::]:0                 LISTENING       4
 Can not obtain ownership information

So it’s process ID 4. I also used TCPView from Sysinternals and also saw that the process ID 4 was using this port. The process name was shown as “System”. In Task Manager, the image name for process ID 4 was System and the description was “NT Kernel & System”. It didn’t help me much either.

So I went through the list of running services and saw a service called “Web Deployment Agent Service” with the description “Remote agent service for the Microsoft Web Deploy 3.5.”. After stopping this service I was able to start Apache on port 80 successfully.

You can check the services by pressing Windows-R to get to the Run prompt, typing services.msc and pressing enter.

If this doesn’t help, I’d recommend searching for a service called “World Wide Web Publishing Service” and stop it. And of course, if IIS is running, you should stop it.

16 thoughts on “Windows: Port 80 is already in use

  1. seemed that WWW Publishing Service turned on when I turned on Microsoft Message Queue (MSMQ) server to Disable TCPDelay

  2. Thank you,man! Thank you! You have no idea how much of my lifetime I wasted trying to solve this fucking mystery of the PID4!!!

Leave a Reply

Your email address will not be published.