Sometimes when trying to restart your server/service you'll see this error message:
This means is a previous debug session is still running and that process is locking the 52895 port and hence the reason the start debug request fails.System.IO.IOException: Failed to bind to address http://127.0.0.1:52895: address already in use.
NOTE: Depending on your particular debug setup that 52895 port will vary.
An easy way to fix this is to kill each an every DotNet process using this command in a PowerShell command prompt:
IMPORTANT: Before running any command from the internet make sure you understand what these commands do. In this case the command is killing all dotnet process which is perfectly acceptable for a development machine running, however running this command in a production environment would be totally acceptable.
Code: Select all
Get-Process -Name *dotnet* | Stop-Process