95

When I try to start a site in IIS it says:

the process can't access the file because it used by another process

I searched in Google and found that another site may have been using Port 80 but in MyIIS I see that only this site is using Port 80. What else could be using Port 80 or is there another issue involved?

hichris123
  • 10,145
  • 15
  • 56
  • 70
  • restart your system once then try. – عثمان غني Jan 19 '13 at 04:31
  • i did it bu again occur same problem –  Jan 19 '13 at 04:32
  • 1
    Try configuring IIS to run on another port. You may have another server running on your machine. Any apache instance? There are a few worms that open port 80 as a backdoor on infected computers too. – nunespascal Jan 19 '13 at 04:37
  • This error text is certainly not helpful but if you check event viewer logs then it gives you some hint that there was an error while binding to port 8080 (used by the website in my IIS). On my windows 10 box it logged two errors from `IIS-W3SVC` and `HttpEvent` source. Second event log text - `Unable to bind to the underlying transport for [::]:8080. The IP Listen-Only list may contain a reference to an interface which may not exist on this machine. The data field contains the error number.`. Port 8080 was in use by an Oracle service. I changed the port used by my website to 8081. – RBT Mar 27 '17 at 11:18

10 Answers10

178

Check using netstat -aon or netstat -aon | findstr 0.0:80 in a command prompt to see which Process Id is LISTENING to port :80 and then watch for that Process Id (PID) in Task Manager with view->select columns-> process id checked. End that process, restart IIS and you are done. (Note: if you have Skype installed, try exiting that process first.)

In a modern Task Manager, you need to go on the Details tab to search for the PID. Or, as mentioned by @Nikita G in the comments, you can use this command to find the task from your command prompt:

tasklist /FI "PID eq 123"

Note: change 123 with the PID returned from the first command.

Lews Therin
  • 3,707
  • 2
  • 27
  • 53
Manoj Purohit
  • 3,413
  • 1
  • 15
  • 17
  • 11
    Thank you also for the Skype comment. – Keith Sep 03 '13 at 08:39
  • Skype was running on port 80 and my websites are also configured on port 80 so i fixed this problem by logging out skype and then after that i changed settings of skype to run on port 8080.(Not compulsory to Start IIS) – Umar Shafeeq Apr 16 '14 at 11:15
  • Holy crap, this was it for me!! How the heck did this happen, I've used Skype for years and just installed it on my laptop a few weeks ago and only this last couple days it did this... wacky! You rule Kola! – Ben Humphrey Jan 20 '15 at 00:02
  • 1
    It's fun when Microsoft products fight... until you have to keep restarting your computer when you realise it's happened again for some unknown reason and haven't the energy to figure out what causes it (until now). Seriously, so very annoying. – andyface Apr 15 '15 at 13:24
  • 10
    Here's a bit easier way to do it. Show only items that listen on port 80: `netstat -aon | findstr 0.0:80`. And then assuming that returns PID 123, run the following to see which process that is: `tasklist /FI "PID eq 123"`. – Nikita R. Jun 18 '15 at 18:24
  • Skype was the culprit. It didn't even show up in netstat -aon – Pramod May 05 '16 at 17:00
  • 1
    For me it was `OracleServiceXE` service which had eaten up port 8080 to which the new website in my IIIS server was trying to bind to. – RBT Mar 27 '17 at 11:19
  • In my case I looked up for another port netstat -aon | findstr 49743 the guilty process was OneDrive! – SimoneMSR Feb 20 '19 at 18:24
35

It is happening because a different process is using port 80, it may be a chat application on your PC like Skype.

First, change the default web site port which was 80 to some unused port (e.g. 8087). To achieve this right click the application and then click on 'Edit Binding'.

enter image description here

enter image description here

After this port change restart again. Now you can identify which process is blocking the IIS Port 80. To check this use netstat command which displays the details of port along with the process ID.

Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70
25

Sign out of Skype and try again. I have experienced the same issue and I just logged out of Skype and then reset my IIS. It worked for me.

3ventic
  • 1,023
  • 1
  • 20
  • 32
Ovais Mumtaz
  • 251
  • 3
  • 2
  • 2
    You can change the port Skype uses [from the settings](http://i.3ventic.eu/20140110211032409.png) – 3ventic Jan 10 '14 at 21:10
11

You can also run this command to find out which application or service is using the port and then trace it down in Task manager (Provided it's not the Web Deploy Agent Service).

netstat -o -n -a | findstr 0.0:80

Then open Task manager, go to Processes, click the "Show processes for all users" checkbox and then click the View menu and Go to the Columns, add the PID column.

Match the Process ID from the netstat command to the PID in task manager and you will find the service or application that's using the port.

Bikey
  • 935
  • 7
  • 12
  • 2
    In case you want to avoid opening task manager, run the following command right after to see which process that is: `tasklist /FI "PID eq "`. – Nikita R. Jun 18 '15 at 18:58
2

As others have said, something else may be using port 80 or 443. It was VMWare Workstation Server for me, but check other answers for how to use netstat.

solublefish
  • 1,681
  • 2
  • 18
  • 24
  • +1 for mentioning port 443. I was using `netstat` to check for port 80 and nothing showed. Then you mentioned port 443 and there it was. – jtate May 16 '17 at 14:25
1

I think this link gives a pretty good explanation and fix of this problem http://support.microsoft.com/KB/890015

Most of the time; it's caused by one of the two reasons: 1) port 80 is being used by something else and as suggested by others you can use netstat -o -n -a |findstr 0.0:80 to see whether this is the case. If yes then kill the process from task manager (tick show processes from all users)

2) if port 80 is not used, the second cause is potentially an invalid ip address in the ListenOnlyList filed in the registry key of HTTP->Parameters. If you follow the link to set the key manually or in fact you can use (xp and server 2003) httpcfg delete iplisten -i ipaddress to delete the invalid ip address. You must restart the http once you edit the ipaddress!

dragonfly02
  • 3,403
  • 32
  • 55
0

In my case, it was the "Sync Share Service" (SyncShareSvc) that was running and using port 80. netstat showed 80 as free, though. I could get the site to run on another port, but not 80. if I added a Host name, IIS would allow me to start the site, but I'd get prompted for Digest authentication when browsing to localhost (or any host name I added). Only Anonymous and Forms Auth were enabled in IIS...

I also found that, after stopping IIS, http://localhost still prompted me for Digest authentication.

The solution - in my case - was to remove File and Storage Services > Files and iSCSI Services > "Work Folders" from the services installed (restart required).

After removing the "Work Folders" service and restarted, IIS worked as expected.

Adam Hey
  • 1,512
  • 1
  • 20
  • 24
0

My case was after installing RD Web Access, the original default websites couldn't be started. Removed the RD Web Access role still same. Removed port 443 binding solved the issue.

Nick
  • 1
0

Most times when this happens by web developers is the reason apache, so if you go to the config file from apache! open it up and search with ctrl + f to 80 and change the ip you will see to 8080 and the sentence beneath there with 80 to 8080 and you need to confige that in you xampp, or the program u are using currently

Hope I'll help u guys out

0

In order to get more meaningful information, one way is to also get ownership information when issuing netstat so that you know the process which is using either 80 (default http binding) or 443 (if https binding is defined):

 netstat -ab

In my case the culprit was vmware:

TCP 0.0.0.0:443 ComputerName:0 LISTENING
[vmware-hostd.exe]

netstat can be piped into find to search for ports 80 or 443 (e.g. find ":443"), but these particular active connection will show at the beginning of the list at they are easy to see.

Alexei - check Codidact
  • 22,016
  • 16
  • 145
  • 164