When attempting to run a custom service on port 80 in Windows Server 2003, you might encounter the frustrating situation where the port is already occupied by the System process (PID 4). This often occurs even after disabling obvious services like IIS Admin and HTTP SSL.
C:\> netstat -ano | findstr :80
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 4
In Windows Server 2003, several built-in Microsoft services can claim port 80 through the HTTP.SYS driver:
- Windows Update Service (WUS)
- Background Intelligent Transfer Service (BITS)
- Web Client service
- Windows SharePoint Services
1. Check for HTTP.SYS reservations:
netsh http show servicestate
netsh http show urlacl
2. Unbind port 80 from HTTP.SYS:
netsh http delete iplisten ipaddress=0.0.0.0
sc config http start= disabled
net stop http /y
3. Alternative method via registry (advanced):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters]
"DisableServerHeader"=dword:00000001
"UrlaclInfo"=hex(7):00,00
After implementing these changes, restart your server and verify with:
netstat -ano | findstr :80
tasklist /svc /FI "PID eq 4"
You should now be able to bind your custom service to port 80. If issues persist, consider checking for third-party applications using kernel-mode drivers that might be intercepting port 80.
For long-term stability:
- Create a startup script to ensure port 80 remains free
- Consider using alternative ports during development
- Document all system port bindings for future reference
Many developers encounter this frustrating scenario when deploying web services on Windows Server 2003. The System process (PID 4) often reserves port 80, preventing other applications from binding to it. This typically happens due to HTTP.SYS, the kernel-mode driver that handles HTTP requests in Windows.
First, confirm which process is using port 80 with these commands:
netstat -ano | findstr :80
tasklist /svc /FI "PID eq 4"
1. Disable HTTP.SYS Directly
Edit the registry to disable HTTP.SYS:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP]
"Start"=dword:00000004
Then restart the server. This completely disables the HTTP API service.
2. Alternative - Configure IIS to Use Different Port
If you need to keep HTTP.SYS but want port 80 available:
- Open IIS Manager
- Right-click "Web Sites" → Properties
- Change TCP Port from 80 to another value
- Restart IIS services
If the issue persists after trying the above solutions:
netsh http show servicestate
netsh http delete iplisten ipaddress=0.0.0.0
This shows active HTTP.SYS listeners and removes specific IP bindings.
Consider these best practices:
- Always check port availability before service installation
- Document all port assignments in your environment
- Use PowerShell scripts to automate port monitoring:
Get-NetTCPConnection -LocalPort 80 | Select-Object OwningProcess, State
As a last resort, you can:
- Uninstall IIS completely via Add/Remove Windows Components
- Disable Windows Activation Service (WAS)
- Check for third-party services that might use HTTP.SYS
Remember that modifying system components can affect other services, so always test changes in a development environment first.