Skip to content

Instantly share code, notes, and snippets.

@jennings
Last active March 25, 2021 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jennings/6bf843cc45c31b71f7a13bd0421d8b4c to your computer and use it in GitHub Desktop.
Save jennings/6bf843cc45c31b71f7a13bd0421d8b4c to your computer and use it in GitHub Desktop.
IIS Express claiming it cannot bind to a port, even though Node is able to without a problem
C:\Program Files\IIS Express
>
PS>netsh int ipv4 show excludedportrange tcp | sls 63300 # I have manually added 63300-63399 as an exclusion
63300 63399 *
C:\Program Files\IIS Express
>
PS>netstat -ano | sls 63325 # Nothing is bound to 63325 right now
C:\Program Files\IIS Express
>
PS>.\iisexpress.exe /path:C:\Temp /port:63325 /trace:error
Copied template config file 'C:\Program Files\IIS Express\AppServer\applicationhost.config' to 'C:\Users\SJENNI~1\AppData\Local\Temp\iisexpress\applicationhost2021325211557774.config'
Updated configuration file 'C:\Users\SJENNI~1\AppData\Local\Temp\iisexpress\applicationhost2021325211557774.config' with given cmd line info.
Starting IIS Express ...
Initializing the W3 Server Started CTC = 1607015
W3 Server initializing WinSock. CTC = 1607046
W3 Server WinSock initialized. CTC = 1607046
W3 Server ThreadPool initialized (ipm has signalled). CTC = 1607062
Start listenerChannel http:0
Failed to register URL "http://localhost:63325/" for site "Development Web Site" application "/". Error description: The process cannot access the file because it is being used by another process. (0x80070020)
Registration completed
Failed to initialize site bindings
Error initializing ULATQ. hr = 80070020
Terminating W3_SERVER object
InitComplete event signalled
Process Model Shutdown called
Unable to start iisexpress.
The process cannot access the file because it is being used by another process.
For more information about the error, run iisexpress.exe with the tracing switch enabled (/trace:error).
C:\Program Files\IIS Express
>
PS>npx serve -l 63325 # Node has no problem binding to 63325 even though IIS Express can't
npx: installed 78 in 7.472s
┌──────────────────────────────────────────────────────┐
│ │
│ Serving! │
│ │
│ - Local: http://localhost:63325 │
│ - On Your Network: http://192.168.240.118:63325 │
│ │
│ Copied local address to clipboard! │
│ │
└──────────────────────────────────────────────────────┘
INFO: Gracefully shutting down. Please wait...
Terminate batch job (Y/N)? y
PS>TerminatingError(): "The pipeline has been stopped."
>> TerminatingError(): "The pipeline has been stopped."
C:\Program Files\IIS Express
>
PS>Stop-Transcript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment