Possible Duplicate:
How to find exe listening on port?

I have 2 web sites that are both configured to run on port 80 but both are stopped. If I start either one, I get the error

Cannot access the file because it is in use by another process

If I change the port of either web site to 81, they both will run, provided that I only start one of the two.

The question is, since I only see one running web site on port 80, how can I determine what is running on port 80?

marked as duplicate by Synetech, Canadian Luke REINSTATE MONICA, Xavierjazz, user3463, Indrek Aug 24 '12 at 0:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


The command netstat -ano will list the PID (process ID) of the process that is listening on each TCP port. For example on my system PID 4 is listening on TCP port 80. Using Task Manager shows that process 4 is system.

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP                 LISTENING       4
  TCP                LISTENING       1016
  TCP                LISTENING       4
  TCP               LISTENING       712 
  TCP               LISTENING       1228
  TCP               LISTENING       756
  • 1
    -b will also show the process name :) – Der Hochstapler Aug 23 '12 at 19:12
  • Ah, thank you! I didn't know that! – HeatfanJohn Aug 23 '12 at 19:15

The fastest and easiest way to find out is to run CurrPorts or TCPView and look for port 80 (or HTTP if resolving is on). You can also find out about other open ports.

They both give you an easy-to-use GUI to monitor and manage the network connections. For example, you can sort and filter them, and simply right-click and select Close to close a connection.

However, if you are getting an accessed denied error on the file, then I don’t think that the port being used is the problem (unless the program is simply using a generic error message and means access is denied on the port). In case the file is locked (not even with read-sharing), then use a program like Unlocker to find out what is locking the web-server’s executable file.


You didn't give the version of Windows you're running, but if you're running Windows Server 2008 / Vista or later, Windows comes with a built-in tool (for Administrators only) called Resource Monitor.

I could swear this has been asked/discussed before on SU...

Here is a guide / walk through of the various features of Resource Monitor, one of which is under Network -> Listening Ports. You should be able to find the culprit there.

Resource Monitor is:

  • Easily accessible through Task Manager on Windows Vista / Server 2008 or later.
  • Graphically oriented and user-friendly.
  • Built into the operating system.
  • More generally useful than a program that only deals with network connections, since it tells you about memory, CPU, and disk also.

Not the answer you're looking for? Browse other questions tagged or ask your own question.