Only one usage of each socket address (protocol/network address/port) is normally permitted?

  1. I opened CMD and typed in : netstat -a
  2. I took a look in the Local Address column.
  3. I took a look at the port portion.
  4. I saw that the port in my program is already active( in use ) in another program.
  5. I changed my port in my program to something else.

    It Worked!

    Big thanks to: @DavidSchwartz, @Gusman


  1. Open cmd
  2. Type netstat –ano
  3. List of process with their ports will be opened
  4. Search ‘process ID’ of the port you are unable to use (in my case port 11020)
  5. Open task Manager and Stop that process
  6. Now your port is ready to use :)

Option 1

  1. Open the Command Prompt.
  2. Type netstat -ano | findstr ":80" - where "80" is the port number you are searching for.
  3. Look at the last column in the results - the PID.
  4. For each PID running that you want to kill, execute taskkill /PID <PID> /F in the Command Prompt window (where <PID> is the PID that needs to be killed).

Option 2

If Option 1 above doesn't work, try rebooting your machine.