views:

341

answers:

1

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?

A: 

ok, not sure why, and I hate such answers, however... the problem went away. I can verify that no code was changed, and it wasn't the transient state of the machine in question as I tried rebooting it more than once during the problem trials.

I have no idea what caused it.

Shachar