I've changed the listening port on IIS to 4016, and getting an odd problem.

Whenever I try to browse to the server with a web browser, I am now getting a "503 Service Unavailable" error.

The strange thing is: I don't get this error if I refer to the server as "localhost" or "" (i.e. http://localhost:4016/ or are OK)

But I do get it if I use the IP address of the server (i.e. displays the error), either from another PC on the network or the server itself. This is the IP address of the server.

I also don't get the error in either case, if I have IIS listen on port 80.

  • I've allowed port 4016 on the firewall

  • I've checked the Application Pool is still running

  • I've checked the Event log (Windows Logs/Application or System), but no entry is displayed when this error is thrown.

  • I've checked the Access log and enabled the Failed Request Tracing but again, no entry is displayed for the error in either.

  • I've made sure that IIS is the only thing listening on Port 4016 (using netstat, and also if I stop IIS, the attempt to browse times out)

  • I've tried disabling the firewall to ensure that's not the issue, but with the same result.

  • Windows 7

Any ideas?


I tried with another port (40163) and it works fine! Unfortunately for my purposes it has to be port 4016. Is there a way of checking why a particular port would be causing a problem?

  • 1
    You might also want to enable the access logs. Apr 25, 2018 at 17:18
  • The Windows Firewall? Have you allowed the port or the application on the Firewall? If only the port, allow the application instead and drop a comment @Fabby
    – Fabby
    Apr 25, 2018 at 18:11
  • As a simple test to rule out the FW, disable it entirely for a moment and then test to connection the port. This will tell you if the FW is blocking the traffic if you disable it "entirely" and then you can access the site without localhost Apr 25, 2018 at 19:28
  • @PimpJuiceIT - Just tried that, and same result (this would also seem to answer @Fabby)
    – komodosp
    Apr 26, 2018 at 7:48
  • @arieljannai - Did this, but no entry appears in the access log for the failing request. (Entries do appear for successful ones though)
    – komodosp
    Apr 26, 2018 at 7:56

1 Answer 1


You need to set the hostname and the port in the site bindings. Sites -> "Your Web Site" -> Edit Site -> Bindings

  • This seems to help alright - I set the hostname to and it now works for - but now it doesn't work for http://localhost:4016! I might get away with that though... It also doesn't explain why it worked fine for port 80 and 40163 though...
    – komodosp
    Apr 26, 2018 at 9:09
  • you can add more hostnames in the site bindings. Do that for localhost and all other IPs/ Hostnames you want to reach over that port.
    – and93hil
    Apr 26, 2018 at 9:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .