Listen to Browser's requests

后端 未结 6 1751
别跟我提以往
别跟我提以往 2020-12-18 17:22

Using the following code:

HttpListener listener = new HttpListener();
//listener.Prefixes.Add(\"http://*:80/\");
listener.Prefixes.Add(\"http://*:8080/\");
l         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-18 17:37

    I dont know, why the GetContext(); hangs, because there is too less information about what happens with the listerner variable, but the problem with port 80 usually is caused by Skype, because it uses port 80 by default. To fix that, open Skype's preferences, go to advanced->connection and uncheck "Use Port 80 and 443 as an alternative for incoming Connections".

提交回复
热议问题