At times you may notice that one or more Web sites are not started in IIS 7.0. If you try to manually start the Web site, it may fail with the following error message:
Internet Information Services (IIS) Manager - The process cannot access the file because it is being used by another process.
(Exception from HRESULT: 0x80070020)
The error code 0x80070020 translates to ERROR_SHARING_VIOLATION (The process cannot access the file because it is being used by another process.)
This issue may occur if TCP port 80 and/or 443 is grabbed by a different service.
Run the following command from a command prompt to find the PID of the process which is using TCP port 80 and/or 443.
netstat -aon | find ":80"
netstat -aon | find ":443"
You will see an output similar to the following. Remember the actual PID will vary from case to case.
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3604
TCP 0.0.0.0:443 0.0.0.0:0 LISTENING 3320
Now using Task Manager you can easily find out to which process the above PID belongs and take appropriate action.
Event ID: 15005
Description: Unable to bind to the underlying transport for [::]:80. 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.
Event ID: 1004
Description: The World Wide Web Publishing Service (WWW Service) did not register the URL prefix http://connect:80/ for site 2. The site has been disabled. The data field contains the error number.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND/OR ITS SUPPLIERS DISCLAIM AND EXCLUDE ALL REPRESENTATIONS, WARRANTIES, AND CONDITIONS WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT LIMITED TO REPRESENTATIONS, WARRANTIES, OR CONDITIONS OF TITLE, NON INFRINGEMENT, SATISFACTORY CONDITION OR QUALITY, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE MATERIALS.