Skip to content

Modernize the example and add a .NET Framework sample#10

Closed
bartes wants to merge 1 commit into
mainfrom
modernize/net8-and-netfx-sample
Closed

Modernize the example and add a .NET Framework sample#10
bartes wants to merge 1 commit into
mainfrom
modernize/net8-and-netfx-sample

Conversation

@bartes

@bartes bartes commented Jun 10, 2026

Copy link
Copy Markdown

Brings the example up to current .NET and broadens platform coverage with a second sample app.

  • Upgrade the ASP.NET Core sample (src/CastleDemo) to net8.0, migrate from Startup.cs to minimal hosting in Program.cs, and switch to AddDefaultIdentity.
  • Drop the Microsoft.VisualStudio.Threading dependency; fire-and-forget Castle calls now use a discard (_ = client.Track(...)). Remove unused scaffolding (ScaffoldingReadme.txt) and the SQL Server migrations, since the app uses the in-memory provider.
  • Add a demo catalog (Demos/DemoCatalog.cs) surfaced on the home page, listing the Login, Risk, Filter, and Log demos.
  • Add a Dockerfile for the ASP.NET Core sample and refresh the README and appsettings.
  • Add a minimal net48 (System.Web) console sample (src/CastleDemo.Framework) that adapts a System.Web request to Context.FromHttpRequest(HttpRequestBase) and sends a Risk request. It requires Castle.Sdk 2.4.0+ (the first version with a net48 target).
  • Add GitHub Actions: an Ubuntu job builds the ASP.NET Core sample and a Windows job builds the .NET Framework sample.

- Upgrade the ASP.NET Core sample to net8.0 and migrate from Startup.cs to minimal
  hosting in Program.cs; switch to AddDefaultIdentity.
- Drop the Microsoft.VisualStudio.Threading dependency; fire-and-forget Castle calls
  now use a discard. Remove unused scaffolding and the SQL Server migrations (the app
  uses the in-memory provider).
- Add a demo catalog (Demos/DemoCatalog.cs) surfaced on the home page.
- Add a Dockerfile for the ASP.NET Core sample and refresh the README and appsettings.
- Add a minimal net48 (System.Web) console sample exercising
  Context.FromHttpRequest(HttpRequestBase).
- Add GitHub Actions: an Ubuntu job builds the ASP.NET Core sample and a Windows job
  builds the .NET Framework sample.
@bartes

bartes commented Jun 10, 2026

Copy link
Copy Markdown
Author

Folded into #11, which now targets main and carries both the modernization commit and the 3.0.0 API demos as a single PR.

@bartes bartes closed this Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant