Listening on Ports

  • Thread starter Thread starter Xarky
  • Start date Start date
X

Xarky

Hi,
I am writing a small web server, to listen on web browser
port(8080), if I'm not wrong. Basically for parsing some tags found
in html.

Now I am doing as follows

TcpListener mainTcp = new TcpListener(8080);
mainTcp.Start();

but the following exception is being given:
Error System.Net.Sockets.SocketException: Only one usage of each
socket address (protocol/network address/port) is normally permitted
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at System.Net.Sockets.TcpListener.Start()

When I change the port number (example 65000) it works.

Can someone help me out

Thanks in Advance
 
Hi,
I have no other web server running. But to be sure is there a way how
to check?

Thanks
 
Try running "netstat.exe -a" from a cmd prompt. Netstat will show you all
the ports and IPs being used on your system.

Good Luck.
 
Back
Top