"AddressAlreadyInUse" error calling start() on TcpListener...

  • Thread starter Thread starter Charlie@CBFC
  • Start date Start date
C

Charlie@CBFC

Hi:

I'm creating a simple port listener. When I call start() method it returns
"AddressAlreadyInUse" error. He is my code...

Int32 port = 80;
IPAddress localAddr = IPAddress.Parse( "127.0.0.1" );
TcpListener server = new TcpListener(port);
server = new TcpListener( localAddr, port );
server.Start(); // Get error here

Thanks,
Charlie
 
Hi,

Charlie@CBFC said:
Hi:

I'm creating a simple port listener. When I call start() method it
returns "AddressAlreadyInUse" error. He is my code...

Int32 port = 80;
IPAddress localAddr = IPAddress.Parse( "127.0.0.1" );
TcpListener server = new TcpListener(port);
server = new TcpListener( localAddr, port );
server.Start(); // Get error here

Probably you already have another process running in port 80, did you try
another port?

Check if you have IIS running in your computer
 
Thanks Ignacio. Needed to shut off IIS.

Ignacio Machin ( .NET/ C# MVP ) said:
Hi,



Probably you already have another process running in port 80, did you try
another port?

Check if you have IIS running in your computer
 

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

Back
Top