Kenshou
Kenshou

Reputation: 93

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?

Upvotes: 1

Views: 14077

Answers (3)

Prasanth B
Prasanth B

Reputation: 1

http://localhost:5001 [http://localhost:5001][localhost] this is the correct version to go

Upvotes: -1

Sergey Tihon
Sergey Tihon

Reputation: 12883

By default, it should listen on both ports

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:

https://learn.microsoft.com/en-us/aspnet/core/security/enforcing-ssl?view=aspnetcore-2.2&tabs=visual-studio#trust-the-aspnet-core-https-development-certificate-on-windows-and-macos

Upvotes: 3

Kenshou
Kenshou

Reputation: 93

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

Upvotes: 0

Related Questions