I have a ASP.NET self-host web api, and I want it to listen on say http://77.176.132.62:51000
.
Things work just fine with http://127.0.0.1:51000
, but as soon as I change it to the server's valid IP address and port, I get this exception:
The format of the specified network name is invalid
In this answer, it's suggested that I change applicationhost.config
file, but that's for IIS or IIS express. I fail to see how can I solve this problem using configuration file.
How should I solve this exception?