Listening on Ports

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
 
X

xarky d_best

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

Thanks
 
T

TonyM

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top