I trying to run this code:
listener = new TcpListener(IPAddress.Any,port: 80);
listener.Start();
socket = listener.AcceptSocket();
but it throws the following exception:
An attempt was made to access a socket in a way forbidden by its access permissions
What may be the reason?
Copyright Notice:Content Author:「ByoTic」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/23593077/socket-exception-in-tcp-listener