Localhost:5001 Refusing Connection with vs Code for Osx

Localhost:5001 Refusing Connection with vs Code for Osx

I am currently trying to run a test ASP.NET Application on OSX using VS Code that is explained here. After running dnx: kestrel and navigating to localhost:5001 I get a Connection Refused.

What can be causing the problem?

2 Answers

By default, it should listen on both ports

  • (http)
  • (httpS)

If you see Connection Refused it may mean that your machine does not trust HTTPS development certificate used.

You may need to run

dotnet dev-certs https --trust

in order to trust HTTPS certificate.

More details and platform specific information is available here:

Turns out it's localhost:5000. If anyone is following that tutorial, keep that in mind.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.