The setting: Windows 7, IIS installed and running.
The following piece of code:
HttpListener listener = new HttpListener();
listener.Prefixes.Add("http://server.com:8080/path");
listener.Start();
Works like charm - any request made against the server is received in my code.
However, when I make the following change (moving to port 80) http.sys/IIS (not sure which) returns HTTP 503 errors:
listener.Prefixes.Add("http://server.com:80/path");
I've tried setting URLACLs, running this process as admin, etc., but nothing changes this behavior.
Edit: to clear this out - there is not actual networking involved in this mess. All this is done locally on a single machine, for testing purposes (both server and client).
Any ideas?