Rider uses project port at startup blocking it so that I cannot debug

When I start Rider it does something that uses the same port as the default .net port 5000, and it means that when I try to run my project port 5000 is already in use and I get this IOException: 

 

What is rider doing that requires the same port as my project? 
I have come to this conclusion by checking what ports are in use with netstat and killed any process that uses port 5000 which kills rider every time. I have also rebooted my computer and it dosen't fix anything. 

0
7 comments

Rider will not use the port. The reason is that you are debugging the project, debugger attached the target application process, thus you can see Rider appears in the port list. 

May I know if you are using Rider on Mac? A common issue is Apple AirPlay service will use port 5000 as default to connect. It conflicted with the default ASP.NET Framework webapp listening port. Please consider changing the port number of your app to prevent this problem if you encounter a similar situation.

 

0

No, I'm not debugging the project. this is directly after startup of Rider, I have not pressed the run/debug button yet. 
Also this is on windows. 

0

Try to disable all downloaded plugins in Settings | Plugin. Is there any difference?

0

I have tried that and still no success

0

You can try to close Rider entirely and run the program with dotnet run in the system terminal. To see if you can see the same error. 

Also, it is worth checking if there is any port conflict in your launchSettings.json and the Rider Run/Debug Configuration

 

0

I have the same problem. My project start on 2052 port, and even during debugging, the application stops receiving messages from other services, and when I restart the debugging, the project cannot start because the port 2052 is already in use. I have to every time restart the whole Rider to debug it again.

0

Lexiphanx Since your issue may be different than the original one, for better tracking, it's recommended to create a separate ticket in our issue tracker with the following details:

  • Provide details about your project. Is it a console or web app project? 
  • Screenshot of the issue
  • Does the issue also occur when running the app in Rider, without debugging? If yes, please also verify if the issue occurs when running “dotnet run” command. 

 

 

 

0

Please sign in to leave a comment.