dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.6k stars 10.06k forks source link

[Windows ARM64] Warn occured when dotnet run F# webapi/MVC in CLI. #42180

Closed v-xiaofchen closed 2 years ago

v-xiaofchen commented 2 years ago

Steps To Reproduce

  1. Installed SDK: 7.0.100-preview.6.22313.2 from https://github.com/dotnet/installer on Windows ARM64.
  2. Created a new F# webapi/mvc in CLI.
  3. Dotnet run the project.

Expected Behavior

Dotnet run the project without warning.

Actual Behavior

Dotnet run F# webapi/mvc with warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3] Failed to determine the https port for redirect. F# webapi project: image F# mvc project: image

.NET Version

7.0.100-preview.6.22313.2 from https://github.com/dotnet/installer.

Note

Dotnet run the F# wewbapi and mvc project successfully.

dotnet --info:

.NET SDK: Version: 7.0.100-preview.6.22313.2 Commit: d3ce508e97

Runtime Environment: OS Name: Windows OS Version: 10.0.25094 OS Platform: Windows RID: win10-arm64 Base Path: D:\Program Files\dotnet\sdk\7.0.100-preview.6.22313.2\

global.json file: Not found

Host: Version: 7.0.0-preview.6.22312.1 Architecture: arm64 Commit: 5c5e66e6c0

.NET SDKs installed: 7.0.100-preview.6.22313.2 [D:\Program Files\dotnet\sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 7.0.0-preview.6.22312.2 [D:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 7.0.0-preview.6.22312.1 [D:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 7.0.0-preview.6.22311.2 [D:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Download .NET: https://aka.ms/dotnet-download

Learn about .NET Runtimes and SDKs: https://aka.ms/dotnet/runtimes-sdk-info

mkArtakMSFT commented 2 years ago

Thanks for contacting us. @vzarytovskii so you own F# ASP.NET Core project templates? //cc @rafikiassumani-msft

v-xiaofchen commented 2 years ago

This issue not repro on SDK: 7.0.100-preview.5.22305.3. F# webapi: image F# mvc: image

vzarytovskii commented 2 years ago

Thanks for contacting us. @vzarytovskii so you own F# ASP.NET Core project templates? //cc @rafikiassumani-msft

Yeah, I guess, our team owns F# templates, I will look at it.

Do you maybe know if something HTTPS-related changed between preview.5.22305.3 and preview.6.22313.2?

Update: I presume, it may be related to this PR https://github.com/dotnet/aspnetcore/pull/42027 @DamianEdwards does this ring a bell to you?

mkArtakMSFT commented 2 years ago

This is the breaking change in Kestrel: https://github.com/aspnet/Announcements/issues/486

vzarytovskii commented 2 years ago

This is the breaking change in Kestrel: aspnet/Announcements#486

Got it, so would adding urls to the config be the easiest fix for it, or was it already covered by #42027

DamianEdwards commented 2 years ago

This is expected behavior after the https changes in #42027. When using dotnet run the first launch profile will be used by default, which now doesn't have an https address binding. The https redirect middleware will log a warning on app start if it can't determine the https address to redirect to because it can't detect it from Kestrel in this case. You can launch the project with the https profile using the --launch-profile or -lp options like this:

$ dotnet run -lp https
SteveSandersonMS commented 2 years ago

Thanks @DamianEdwards. Closing as expected.