IIS Express Responses Not Available for Local Request on Specific Port
I had an ASP.NET application running on an auto-generated port like 53000. After switching to a different port (8080 in my case) IIS Express started responding 503 Service Unavailable
. Other ports did work.
The internet is full of tips on what to check and how to debug it, while in most cases the tips are specific to IIS or to remote computers. However, I've tried:
- Overview
%userprofile%\Documents\IISExpress\config\applicationhost.config
- Granting Permissions Using
netsh http add urlacl url=http://mymachinename:50333/ user=everyone
- Testing the same application on another machine with port 8080 - worked
- Disable another server ( mongoose ) on port 8080 - worked
- Checked that the port is listening with
netstat
- no problem
I have not checked the firewall and folder permissions as the application is served from other ports.
source to share
Finally, I resolved the issue after reading this post - http://haacked.com/archive/2007/05/21/the-iis-7-team-rocks.aspx/ . In particular, it is suggested to consider the urlacl bindings and remove the problematic ones. It turned out that sometime in the past, an 8080 binding was added. Oddly enough, this allowed access from every computer to every user on that port, but apparently this was the problem.
Solution : run netsh http show urlacl
. I found 2 relevant bindings - one old and the other recent, for example:
Reserved URL : http://+:8080/
User: \Everyone
Listen: Yes
Delegate: No
SDDL: D:(A;;GX;;;WD)
Remove it with netsh http delete urlacl url=http://+:8080/
source to share