dotnet-presentations / dotnet-presentations/ai-workshop

Part 9 AppHost HTTP launch profile fails under Aspire

Open Beginner friendly
#653 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs-decision
Dominant language
C#
Stars
56
Forks
33
Avg merge
19h 26m
Merged PRs (30d)
45

Description

Issue type

bug

Requested priority

P2 - A workaround exists, an optional path is broken, or significant drift exists

Workshop area

Part 9 - Adding AI to an Existing App

Summary

The committed http launch profile in both Part 9 AppHost snapshots fails before resources start because Aspire rejects a non-HTTPS applicationUrl unless unsecured transport is explicitly allowed.

The README's default dotnet run --project eShopLite.AppHost command works because it selects the HTTPS profile, so the primary attendee flow is not blocked.

Attendee or instructor impact

Anyone explicitly selecting the HTTP profile from the CLI or IDE receives an Aspire startup failure. The presence of a committed profile implies that it is supported, and instructors may select it while diagnosing local certificate or HTTPS issues.

The workaround is to use the default HTTPS profile or set ASPIRE_ALLOW_UNSECURED_TRANSPORT=true for the HTTP profile.

Reproduction or proposed change

From either Part 9 snapshot or a clean scratch copy, run:

dotnet run --project eShopLite.AppHost --launch-profile http

Observed error under Aspire 13.4.6:

The 'applicationUrl' setting must be an https address unless the
'ASPIRE_ALLOW_UNSECURED_TRANSPORT' environment variable is set to true.

The default command succeeds:

dotnet run --project eShopLite.AppHost

Proposed change:

  1. Update both:
    • Part 09 - Adding AI to an Existing App/eShopLite-start/eShopLite.AppHost/Properties/launchSettings.json
    • Part 09 - Adding AI to an Existing App/eShopLite/eShopLite.AppHost/Properties/launchSettings.json
  2. Either add ASPIRE_ALLOW_UNSECURED_TRANSPORT=true to the HTTP profile's environment variables or remove the unsupported profile.
  3. Keep the start and completed snapshots aligned.
  4. If unsecured transport is retained, add a brief explanation that it is local-development-only.
Expected outcome

Every committed launch profile starts successfully, or unsupported profiles are removed so the project exposes only valid launch choices.

Validation
  • Run both eShopLite-start and eShopLite from scratch copies.
  • Start the default profile and confirm Products and Store become healthy.
  • Start the explicit HTTP profile and confirm Products and Store become healthy.
  • Build both solutions in Release with zero warnings.
  • Confirm launch-setting changes are identical in the paired snapshots.
Dependencies and related issues

The separate Aspire-version PR mentioned during triage may alter the exact behavior. Revalidate this issue after that PR lands and close it if the profile becomes valid without an explicit setting.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the explicit HTTP profile command from clean copies of both Part 09 snapshots, then inspect the paired eShopLite.AppHost/Properties/launchSettings.json files named in the issue. Keep the launch settings aligned and ensure the HTTP profile is valid or removed, then verify both snapshots' default and HTTP startup behavior and Release builds as listed.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.