Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manually stop kestrel server

I am doing this basic tutorial: http://www.asp.net/get-started It suggests doing some changes, then running dotnet run again. However, Ctrl+C isn't working and the Package Manager Console seems frozen. When I exit VS and/or restart it, I do my changes and dotnet run again. When I am doing this, I am getting an error (not the same every time), because the server is already running. The question is simple as 1-2-3: How do I manually stop the kestrel server? (I am running Windows 10).

like image 624
Petros Apotsos Avatar asked Aug 11 '16 21:08

Petros Apotsos


People also ask

How do I stop after dotnet run?

Press Ctrl+C to shut down.

What is Kestrel .NET framework?

Kestrel is open-source (source code available on GitHub), event-driven, asynchronous I/O based server used to host ASP.NET applications on any platform. It's a listening server and a command-line interface. You install the listening server on a Windows or Linux server and the command-line interface on your computer.


1 Answers

On OSX Terminal:

sudo lsof -iTCP -sTCP:LISTEN -P | grep :5000 

enter image description here

sudo kill -9 1872 
like image 155
Javier Flores Avatar answered Sep 20 '22 23:09

Javier Flores