Failed to bind to address (already in use) error with Visual Studio Mac API

后端 未结 7 1749
隐瞒了意图╮
隐瞒了意图╮ 2021-01-21 03:34

I\'m attempting to create a Web API via .Net Core. I\'m just using the boilerplate ValuesController as a Hello World. When I run the project, I get the following error:

相关标签:
7条回答
  • 2021-01-21 04:19

    Sure you can change the port every time you get that error or even restart your computer, here is the correct way to go about this

    Find what is running on that port and kill the process

    Terminal on mac

    find the process number

    lsof -i: <port number> eg lsof -i:5001

    Then kill the process number

    kill -9 <process number> eg - kill -9 1600

    0 讨论(0)
提交回复
热议问题