Only one usage of each socket address (protocol/network address/port) is normally permitted?
- I opened CMD and typed in : netstat -a
- I took a look in the Local Address column.
- I took a look at the port portion.
- I saw that the port in my program is already active( in use ) in another program.
I changed my port in my program to something else.
It Worked!
Big thanks to: @DavidSchwartz, @Gusman
- Open cmd
- Type netstat –ano
- List of process with their ports will be opened
- Search ‘process ID’ of the port you are unable to use (in my case port 11020)
- Open task Manager and Stop that process
- Now your port is ready to use :)
Option 1
- Open the Command Prompt.
- Type
netstat -ano | findstr ":80"
- where "80" is the port number you are searching for. - Look at the last column in the results - the PID.
- 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.