Httplistener not working on port 80?

Setup: Windows 7, IIS installed and running.

The following code snippet:

HttpListener listener = new HttpListener();
listener.Prefixes.Add("http://server.com:8080/path");
listener.Start();

Works like a spell - 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 what) returns HTTP 503 errors:

listener.Prefixes.Add("http://server.com:80/path");

I tried setting the URLACL, starting this process as admin, etc., but nothing changed this behavior.

Edit: clear it - there is no real network in this mess. All this is done locally on the same machine for testing purposes (both for the server and for the client).

Any ideas?

+3
source share
2 answers

ok, , , , ... . , , , .

, .

+1

Windows Server 2008 R2. 8080, , 80. , 80, IIS ( IIS ​​ , IE ) . , , . (), IE, . .

, , , ( ) IE.

0

Source: https://habr.com/ru/post/1730737/


All Articles