How to Identify and Resolve Port 80 Conflicts Preventing IIS Startup on Windows Vista


2 views

When IIS 7 on Windows Vista fails to start with the error "The process cannot access the file because it is being used by another process," this typically indicates a port conflict. Since changing to port 82 works, we can confirm another service is occupying port 80.

Here are three effective methods to identify which process is using port 80:

1. Using Command Prompt (Admin privileges required):
   netstat -ano | findstr :80

2. Using PowerShell:
   Get-Process -Id (Get-NetTCPConnection -LocalPort 80).OwningProcess

3. Using Resource Monitor:
   - Open Resource Monitor (resmon.exe)
   - Go to Network tab
   - Check "Listening Ports" section

These services frequently claim port 80 on Windows systems:

  • SQL Server Reporting Services
  • World Wide Web Publishing Service (another IIS instance)
  • Apache HTTP Server
  • Skype (in older versions)

Once you've identified the process, you have several options:

// To stop a service temporarily (example for SQL Server Reporting Services):
net stop "SQL Server Reporting Services (MSSQLSERVER)"

// To disable a service permanently:
sc config "SQL Server Reporting Services (MSSQLSERVER)" start= disabled

If you need to keep the existing service running on port 80, consider:

  1. Configure IIS to use host headers instead of port changes
  2. Set up port forwarding from 80 to your alternative port
  3. Use URL rewriting in IIS to maintain compatibility

Add these checks to your deployment scripts:

@echo off
netstat -ano | findstr :80 > nul
if %errorlevel% equ 0 (
   echo Port 80 is in use
   pause
   exit /b 1
) else (
   echo Port 80 is available
)

Many Windows server administrators have faced this situation - you try to start IIS (Internet Information Services) only to be greeted with the error: "The process cannot access the file because it is being used by another process." When this happens, your first troubleshooting step should be to verify whether port 80 is indeed occupied.

Before diving deep into diagnostics, try this simple test:

net stop was /y
net start w3svc

If this works, it was a temporary conflict. If not, continue reading.

Windows provides several tools to identify processes using specific ports:

Method 1: Using Command Line (Admin)

netstat -ano | findstr :80

This will show all processes using port 80. Note the PID (Process ID) in the last column.

Method 2: Find the Process Name

tasklist /FI "PID eq [PID_from_above]"

Replace [PID_from_above] with the actual PID number you found.

Method 3: Using Resource Monitor

1. Open Resource Monitor (resmon.exe)
2. Go to the Network tab
3. Look under "Listening Ports" for port 80

Based on experience, these applications often steal port 80:

  • Skype (check Tools > Options > Advanced > Connection)
  • SQL Server Reporting Services
  • Other web servers (Apache, nginx)
  • Windows Process Activation Service (WAS)
  • Bonjour service (common with Apple software)

For more detailed information, try this PowerShell command:

Get-Process -Id (Get-NetTCPConnection -LocalPort 80).OwningProcess

If you need to forcibly clear port 80 (use with caution):

taskkill /F /PID [PID_number]

To avoid this issue recurring:

  1. Configure alternative ports for non-essential services
  2. Use the following command to reserve port 80 for IIS:
netsh http add iplisten ipaddress=:80

If you must keep the conflicting service running, consider configuring IIS to use port sharing:

netsh http add urlacl url=http://+:80/ user=Everyone