dotnet-presentations / dotnet-presentations/ai-workshop
Part 9 AppHost HTTP launch profile fails under Aspire
Nobody has claimed this yet.
- 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:
- Update both:
Part 09 - Adding AI to an Existing App/eShopLite-start/eShopLite.AppHost/Properties/launchSettings.jsonPart 09 - Adding AI to an Existing App/eShopLite/eShopLite.AppHost/Properties/launchSettings.json
- Either add
ASPIRE_ALLOW_UNSECURED_TRANSPORT=trueto the HTTP profile's environment variables or remove the unsupported profile. - Keep the start and completed snapshots aligned.
- 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-startandeShopLitefrom 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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