Transition from ASP .NET CORE 3.1 to .NET 6.0 Framework, Certificate Issue

Jovencio Sebucao
1
Reputation point
I have an existing project using ASP .NET Core 3.1 framework. I use Kestrel as web server. Then, I updated the framework into .NET 6.0. And when I run it locally or I run it on Linux server using Kestrel, I always get this error.
System.InvalidOperationException: 'The non-HTTPS endpoint Http includes HTTPS-only configuration for Certificate.'
Even if I remove the HTTPS redirection, the error persist.
Any feedback or information that can help fix my issue is welcome. Thank you.
{count} votes
Sorry for late reply. I run the code using Kestrel Service. Here is the Program.cs
Here is the launchsettings.json
Thanks for sharing. If you are debugging directly inside the VS, I suggest you could try to modify your launchsettings like below, add the application url.
"profiles": {
"CoreSixWebAPI": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "http://localhost:5257",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
Sign in to comment