I have a folder with identity scaffolded dotnet application from the official tutorial.
After i run dotnet watch run
, I have an error like this:
❯ dotnet watch run
watch : Started
crit: Microsoft.AspNetCore.Server.Kestrel[0]
Unable to start Kestrel.
System.IO.IOException: Failed to bind to address https://127.0.0.1:5001: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (48): Address already in use
at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
Apparently my previous dotnet core app that was run through cli and stopped with ctrl + c does not stop. What should I do?
I saw this and this questions but they did not help. Also opened an issue in dotnet core app, is this a bug? How did everyone stop dotnet core app?
Do I need to stop it from activity monitor everytime? I saw dotnet service, and also Identity service on my activity monitor. I'm not sure how many service do I need to clear if the cli doesn't clean its own service