I'm developing an ASP.NET Core project recently upgraded from .NET 6 to .NET 9, in VS 2022.
For the past few days for unknown (to me) reasons, I can't run the app on localhost 5001 port, after deployment (to a local folder).
When I use details below in appsettings.json
, the deployed application runs on port 5001 properly:
"Kestrel": {"Endpoints": {"Http": {"Url": "http://127.0.0.1: 5000" },"Https": {"Url": "https://localhost: 5001" }}}
But then I can't launch it from VS. I didn't make any manual changes to launchsettings.json
or program.cs
, I use app.UseHttpsRedirection()
Is there any possibility to set default settings for development and deployment? I experienced no troubles in .NET 6, and had nothing to do with ports at all.