I'm following along Microsoft's tutorial on Asp.net core web api (https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-web-api?view=aspnetcore-5.0&tabs=visual-studio).
I'm trying to configure Kestrel and I've added this to appsettings.json
{
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://localhost:5000"
},
"Https": {
"Url": "https://localhost:5001"
}
}
}
}
When I start the app now, https works fine, but the http connection does not work. I get "site can't be reached error".
Can someone explain why this is? If I remove the Kestrel configuration, both http and https work fine.