Feature/mvc example - #2
Merged
Merged
Conversation
- Rename secret path from dev/DGates.AwsSecretsManager.Examples/OpenWeatherMap to dev/MvcExample/OpenWeatherMap, matching ConsoleExample's dev/ConsoleExample/DbConfig pattern - Update seed-secrets.sh to seed the new secret name - Fix LOCAL_DEV.md fallback JSON example to match secret name/shape actually seeded (Url + Key fields, not ApiKey) - Add dev/MvcExample/OpenWeatherMap to "Secrets seeded by default" table - Document seed-secrets.local.sh as the supported pattern for testing against a real OpenWeatherMap key (gitignored, never committed)
… layout feat: add weather demo page, MvcExample.Core/Tests split, Bootstrap 5 layout - Weather controller/view is the default route; drop Home, About, HowTo, Contact in favor of a single working demo - Add MvcExample.Core (net48;net8.0) for testable, AWS-SDK-free secret/view-model logic - Add MvcExample.Tests (xUnit), runs cross-platform via `dotnet test --framework net8.0` - Wire both into the .sln alongside the existing MvcExample web project - Update _Layout.cshtml for Bootstrap 5
… layout - Weather controller/view is the new default route; drop Home/Index and Contact, keep About (content replaced) - Add MvcExample.Core (net48;net8.0) for testable, AWS-SDK-free secret/view-model logic - Add MvcExample.Tests (xUnit), runs cross-platform via `dotnet test --framework net8.0` - Wire both into the .sln alongside the existing MvcExample web project - Update _Layout.cshtml for Bootstrap 5, add Weather Demo/GitHub nav links
…tes.AwsSecretsManager.Examples into feature/mvc-example
- Rename section to "Running examples without Docker" - Add ConsoleExample JSON fallback steps (was MvcExample-only) - Fix DbConfig fixture shape to match seed-secrets.sh (Server/Database/ Username/Password, not guessed fields) - Fix MvcExample placeholder key to YOUR_KEY_HERE, matching seed script
…th resolution - Program.cs: read LocalJsonFallbackPath from App.config and set it on SecretsManagerSettings (was previously missing entirely) - ConsoleExample.csproj: copy fixtures/console-secrets.json to output directory on build, so the relative path in App.config resolves when running the built exe - LOCAL_DEV.md: correct ConsoleExample fallback steps to match actual wiring; add matching MvcExample fixture section
- Without a BOM, classic ASP.NET Razor falls back to the machine's
default codepage instead of UTF-8, corrupting the em dash (— → â€")
in About.cshtml and Weather/Index.cshtml
- Move 9 packages (Mvc, Razor, WebPages, Web.Optimization,
Web.Infrastructure, WebGrease, Antlr, Newtonsoft.Json, CodeDom
compiler platform) from packages.config to PackageReference, so
`dotnet restore`/`dotnet build` no longer depend on a pre-populated
local packages/ folder (which doesn't exist on a clean CI checkout)
- packages.config now only holds the 4 content-only front-end
packages (bootstrap, jQuery, jQuery.Validation, unobtrusive
validation) whose files are already checked in
- Legacy (non-SDK) csproj doesn't auto-populate compile references
from PackageReference like SDK-style projects do, so wire each package's resolved path via GeneratePathProperty + explicit
Reference/HintPath instead
- Keep CodeDom compiler-platform's build customization
Windows/full-framework-only (ExcludeAssets on Core), same fix as
before, now expressed as PackageReference metadata
- Drop the now-obsolete manual CodeDom props import and
EnsureNuGetPackageBuildImports target (packages.config-era
bookkeeping)
- Verified full solution build + test pass from a clean state with no
local packages/ folder present
- WeatherController: secret lookup -> geocode -> weather -> view model,
with user-facing messages for unconfigured key/city-not-found/errors
- MvcExample.Core: pure parsing/view-model logic, no AWS SDK/System.Web
dependency, covered by 17 new unit tests
- Add MvcExample.Infrastructure (net48-only) to hold SecretsManagerAccessor,
so the legacy web project pulls in DGates.AwsSecretsManager and its
transitive deps via ProjectReference instead of hand-wired references
- Web.config: add AWS/LocalStack appSettings, fix stale Newtonsoft.Json
binding redirect (11.0.0.0 -> 13.0.0.0), add post-build copy step for
transitive DLLs the legacy project's P2P copy was dropping
- Update CLAUDE.md structure and docs/LOCAL_DEV.md
- Web.config was missing redirects for the dependency cluster pulled in
via DGates.AwsSecretsManager (AWSSDK.*, Polly, Polly.Core,
Microsoft.Bcl.*, System.Text.Json, System.Memory, System.ValueTuple,
and other BCL polyfills), causing a FileLoadException at runtime on
Windows (Microsoft.Bcl.AsyncInterfaces version mismatch)
- Versions/public key tokens confirmed against the actual resolved
assemblies via reflection, not guessed
…the app
- WeatherController GET now fetches the secret and shows the "configure
your API key" warning immediately, instead of only after a search
(IsConfigured was never checked outside the POST handler)
- Global.asax no longer lets a SecretsManagerAccessor.Initialize()
failure take down the whole app domain; logs via Trace and degrades
to per-request failures instead
- Add BackendUnavailable() view model for when the secrets backend
can't be reached at all (distinct from "key is still a placeholder")
- Move the "demonstrates DGates.AwsSecretsManager" blurb to a footer
below the search/results instead of above it
- SecretsManagerAccessor now resolves relative LocalJsonFallbackPath
values against HostingEnvironment.ApplicationPhysicalPath instead of
leaving them as bare relative paths, which under IIS/IIS Express
resolved against the worker process's arbitrary working directory
rather than the site's physical root (confirmed via a real
FileNotFoundException on Windows, not just assumed)
- Add a distinct LocalFallbackFileNotFound() message so a missing
fixture file no longer looks identical to "can't reach LocalStack"
- Drop the now-confirmed-unnecessary CopyToOutputDirectory step for
the fixture file in MvcExample.csproj
- Update LOCAL_DEV.md to describe this as verified, not assumed
- Show secret name, retrieved URL, and source (AWS/LocalStack vs. JSON fallback) after a successful search
- Center search form, result card, and info panel in a single column instead of left-aligned against the container edge - Give the weather result more visual weight than the "how it worked" panel (larger temp display, weather emoji, subtle accent) - Enlarge search input/button as the primary interaction - Remove duplicated library description from footer (already in hero)
- Remove "(coming soon)" from MvcExample sections in README now that
it's built; describe the actual demo (city search + "how this
worked" panel) instead of the old placeholder text
- Fix two broken anchor links left over from a heading rename
(#running-mvcexample-without-docker -> #running-examples-without-docker)
- Add a "Run MvcExample" section to LOCAL_DEV.md (previously only
ConsoleExample had one) and note Visual Studio/IIS Express as a
Windows-only prerequisite
- Add CHANGELOG entry for the 0.2.0 MvcExample work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.