8

This is on a Windows Vista machine running IIS 7. Trying to start Default Web Site, but it says: "The process cannot access the file because it is being used by another process?

If I change binding to port 82, it works fine. So I guess something is running on 80. How do I find what it is?

2
  • If you are still having problem ... There is a second possible cause listed on the MS support page - " The ListenOnlyList registry subkey is not configured correctly on the computer that is running IIS. " Details here: support.microsoft.com/kb/890015
    – apocalypse9
    Sep 20, 2009 at 2:01
  • Rebooted and problem went away :)
    – epitka
    Sep 20, 2009 at 2:19

8 Answers 8

10
netstat -ab | find ":80 "

Notice the space after 80. The /b requires an elevated command prompt.

EDIT: After close inspection, piping netstat -ab into find with that search string does not display the executable that the -b switch retrieves. This is because -b displays the owning process on a new line. =( I fail. But at least the first half of the command will work. I just had to get all fancy with the find command. =)

2
  • 1
    In my case it was skype that was using it. Very strange. Closed skype and then started website, website ran fine. Then started skype too. Skype running fine too.
    – user70410
    Apr 4, 2012 at 7:47
  • Skype was guilty in my case too Sep 17, 2013 at 9:44
4

The first thing I would do is open a browser to http://localhost/ and see what comes up... Then I'd check netstat of course.

3

TCPView:

http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

3

I dont know on Vista but on XP you could:

netstat /a /b

on the console to check this.

1

Start a command prompt as an administrator and run the command netstat -ab and find the appropriate line in the output. This should tell you the executable name of the process listening on that port.

Once you have that, there's a good chance you'll have an idea of what to look for, but if you're not sure what that executable file is, you can start Task Manager, go to the Processes tab, find the process in question, and right-click it and select Properties to get more info. If there are multiple processes with that name, run netstat -ao to get the process ID.

1
  • This was fastest way for me, so I accepted it. However I cannot see anything on port 80. Hmmm.
    – epitka
    Sep 20, 2009 at 1:55
1

You can use NETSTAT -ADO to view ports in use, but unfortunately this doesn't give you the name of the application that opened a specific port. It does give you the process id, which you can use to zero in on the specific program in Task Manager.

Alternatively, you can download SysInternals' Tcpvcon program. When run, you'll see a full list of open ports as well as the programs which opened them.

1
  • 1
    I don't know what you think -d might do but -o is more useful than -b as it displays the PID on the same line and doesn't require elevation.
    – Neil
    May 22, 2012 at 8:53
0

Sysinternals - as mentioned in Dave's post (Sorry for the wrong info on my initial post)

or

http://www.howtonetworking.com/command/openport1.htm

Describes how to do this from the command line.

3
  • Portmon monitors and displays all serial and parallel port activity on a system, not network ports.
    – Rohan West
    Sep 20, 2009 at 1:51
  • The tool you're linking to is for a very different kind of ports. You might have been thinking of TCPView (technet.microsoft.com/en-us/sysinternals/bb897437.aspx), which is, for the most part, netstat in a GUI.
    – Michael Madsen
    Sep 20, 2009 at 1:51
  • That is because I'm a complete idiot today. I remembered it was from the sysinternals suite and grabbed the first one from the search. Good catch- and sorry for the stupid.
    – apocalypse9
    Sep 20, 2009 at 1:54
0

The other answers will tell you what has port 80 open. But this might be System if port 80 has been opened by another application using HTTP.SYS (as IIS does1).

To see what is using HTTP.SYS to listen you can use (from an elevated command prompt):

netsh http show servicestate

(This gives a lot of information.)

Also HttpCfg.exe might work (from Windows XP SP2 Resource Kit).


1 This is why even if IIS is running on port 80 it does not show up as listening on port 80.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .