Archive For March 2023

Why doesn't my ASP.NET Core 7 web app launch on HTTPS?

calendar_today 20 March 2023 13:37

.NET 6 .NET 7 ASP.NET Core Razor Pages

Up until .NET 7, when you use the dotnet run command to run your ASP.NET Core Razor Pages (or MVC) app, the built-in Ketstrel web server would listen on two URLs, one with a http protocol and another that uses the https protocol. This behaviour is documented in many places (including my book) so it might come as a surprise when you run your new .NET 7 app from the command line and it is only available on an http binding. Something changed in .NET 7. What is it and how do you test your .NET 7 web app under https?