user1729807
user1729807

Reputation:

Can't start site in IIS (use by another process)

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?

Upvotes: 96

Views: 93825

Answers (11)

Brijesh Ray
Brijesh Ray

Reputation: 1303

I faced this issue in IIS while browsing sites as

"The process cant access the site because its being used by another process".

It means the port no is already being used by another process and there are two ways to fix it.

1st way)

Killing the process.

Open command prompt--> run "netstat -o -n -a | findstr 0.0:8081" (where 8081 is port number)-->Process with PID displayed

Now open Task manager--find PID --Kill it

Re browse sites-->it will work

2nd way)

Change port number

Upvotes: 0

Manoj Purohit
Manoj Purohit

Reputation: 3453

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.

Upvotes: 182

Alexei - check Codidact
Alexei - check Codidact

Reputation: 23108

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.

Upvotes: 0

Arne Schouten
Arne Schouten

Reputation: 11

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

Upvotes: 0

solublefish
solublefish

Reputation: 1901

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.

Upvotes: 2

Ravindra Bagale
Ravindra Bagale

Reputation: 17673

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.

Upvotes: 35

Nick
Nick

Reputation: 1

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.

Upvotes: 0

dragonfly02
dragonfly02

Reputation: 3679

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!

Upvotes: 1

Adam Hey
Adam Hey

Reputation: 1691

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.

Upvotes: 0

Bikey
Bikey

Reputation: 945

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.

Upvotes: 11

Ovais Mumtaz
Ovais Mumtaz

Reputation: 251

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.

Upvotes: 25

Related Questions