Skip to content

Modernize the example, add a .NET Framework sample, and demonstrate the 3.0.0 API#11

Closed
bartes wants to merge 2 commits into
mainfrom
parity/dotnet-3.0-demos
Closed

Modernize the example, add a .NET Framework sample, and demonstrate the 3.0.0 API#11
bartes wants to merge 2 commits into
mainfrom
parity/dotnet-3.0-demos

Conversation

@bartes

@bartes bartes commented Jun 10, 2026

Copy link
Copy Markdown

Brings the example up to current .NET, broadens platform coverage with a second sample app, and demonstrates the full Castle.Sdk 3.0.0 API surface.

Modernization & platform coverage

  • 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.Log(...)). 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.
  • 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. 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.

3.0.0 API demos

  • Add demo pages for the Lists (create/add item/query/delete), Privacy (request/delete user data) and Events (schema + query) APIs, and a Webhook page that verifies a signed payload against the X-Castle-Signature header. Each is registered in Demos/DemoCatalog.cs and listed on the home page.
  • The Login demo now sends a Risk request on success and a Log request on failure (previously Authenticate/Track).
  • The net48 console sample no longer reads the client id; it builds context from IP and headers and sends a Risk request.
  • Bump the ASP.NET Core sample to Castle.Sdk 3.0.0.

bartes added 2 commits June 10, 2026 11:13
- 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.
…ve Login off legacy endpoints

Adds demo pages for the Lists, Privacy and Events APIs and webhook signature
verification, and registers them in the demo catalog. The Login demo now sends
Risk on success and Log on failure, and the .NET Framework sample no longer
reads the client id. Bumps the ASP.NET Core sample to Castle.Sdk 3.0.0.
@bartes bartes changed the title Add Lists/Privacy/Events/Webhook demos and move Login off legacy endpoints Modernize the example, add a .NET Framework sample, and demonstrate the 3.0.0 API Jun 10, 2026
@bartes bartes changed the base branch from modernize/net8-and-netfx-sample to main June 10, 2026 15:32
@bartes bartes closed this Jun 10, 2026
@bartes bartes deleted the parity/dotnet-3.0-demos branch June 10, 2026 15:35
@bartes

bartes commented Jun 10, 2026

Copy link
Copy Markdown
Author

Superseded by #12. The head branch was renamed off the parity/ prefix, which closed this PR; #12 is the same combined change (modernization + 3.0.0 demos) from the renamed net8-and-3.0-demos branch.

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