dotnet / aspire-samples

MIT License
616 stars 178 forks source link

[WebToolsE2E][Aspire] When you use VS to run AspireShop/AspireWithNode for the first time, token authentication is required and you cannot automatically enter the dashboard page. #244

Closed v-sherryfan closed 4 months ago

v-sherryfan commented 4 months ago

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU
  2. Install VS 17.10 GA from PR 546661 [ Includes Aspire 8.0.0-preview.6.24214.1, sdk 8.0.300 ]
  3. Install Aspire 8.0 GA [8.0.0-preview.7.24229.1]
  4. Apply NuGet dotnet-tools Feeds
  5. Install Docker Desktop for Windows

REPRO STEPS

  1. Clone aspire-samples repo, checkout release/8.0 branch
  2. Open AspireShop.sln
  3. Build and run (F5 / Ctrl+F5)

ACTUAL: Token authentication is required when using VS Run for the first time (Both AspireShop and AspireWithNode ) image

Note:

EXPECTED When running with vs, token verification is not required to automatically enter the AspireShop dashboard page.

DamianEdwards commented 4 months ago

Curious why the URL in the screenshot is 127.0.0.1? That won't work with the developer certificate (hence the "not secure" message) and shouldn't be what VS launches the browser with.

DamianEdwards commented 4 months ago

I reproduced this however the browser was launched with the expected https://localhost:15179 URL. Not sure what's going on.

DamianEdwards commented 4 months ago

This is caused by a bug in Visual Studio and the fact the release/8.0 branch was specifying version of 8.0.0-* for the Aspire packages. VS attempts to parse the version of the Aspire.Hosting.AppHost package being referenced in order to determine whether to generate a dashboard key or not and it's not handling versions with wildcards or ranges. I've updated the release/8.0 branch to use concrete versions and we'll look to fix the issue in Visual Studio.

/Cc @BillHiebert

v-sherryfan commented 4 months ago

Verified that this issue is not reproduced on releae/8.0 branch using VS 17.10 Preview 7 FB [include 8.0.0-preview.7.24251.11]