I had a working ASP.NET application running on automatically generated port like 53000. After move to another port (8080 in my case) IIS Express started responding 503 Service Unavailable
. Other ports did work.
Internet is full of tips for what to check and how to debug this, while in most cases tips are relevant for IIS or access from remote machine. Nevertheless I've tried:
- Reviewing
%userprofile%\Documents\IISExpress\config\applicationhost.config
- Giving permissions with
netsh http add urlacl url=http://mymachinename:50333/ user=everyone
- Test of the same application on different machine with port 8080 - did work
- Ran another server (mongoose) on port 8080 - did work
- Verified that the port is listened to with
netstat
- no problem
I haven't checked the firewall and folder permissions, since application is served from other ports.
Finally, I've solved the problem after reading this post - http://haacked.com/archive/2007/05/21/the-iis-7-team-rocks.aspx/. Specifically it suggests to review urlacl bindings and remove problematic ones. It appeared, that sometime in the past a binding to 8080 was added. Strangely, it did allow access from every computer to every user to this port, but apparently this was a problem.
Solution: run
netsh http show urlacl
. I found 2 relevant bindings - one old and another recent, like:Remove it with
netsh http delete urlacl url=http://+:8080/