Topic

.NET & C#

Runtime behaviour, async, memory and APIs, explained from the source and checked with code you can run.

Azure & Architecture19 min

Reservation Confirmed or Work Accepted: What 201 and 202 Promise

A 202 promises an operation, not a reservation. Build both designs on SQL Server: idempotent admission, a claim that really skips locked rows, and leases fenced by generation.

AI Engineering15 min

One Question, Several Queries: Typed Intent Between Language and SQL

Let the model propose meaning, not SQL. Parse a small typed intent strictly in .NET 10, compile it to reviewed templates, enforce the tenant in SQL Server and return results that say what they count.

.NET & C#15 min

Semantic Search in Blazor WebAssembly: Where the Cost Moves

Run an embedding model in a Web Worker behind a Blazor component, then follow the cost it moves: a 90 MB first visit, exact tokenization and pooling, stale results, caching and cleanup.

Azure & Architecture14 min

Deployer, Runtime, Operator: Three Azure Identities and One Cache Key

Follow four tokens through one Azure service: audience checks, workspace membership, a cache key that leaks across tenants, and why publishing code is data access.

Performance & Data13 min

Keep the Failed Attempt: Retry History, Late Events and Retention

A retry that overwrites one status row erases the timeout before it, and a late report can undo the success. Build an attempt ledger in SQL Server that keeps both and survives retention.

Azure & Architecture15 min

ASP.NET Core Behind a Proxy: The Redirect Loop and the Lost Prefix

Why an app behind a TLS-terminating proxy redirects HTTPS to itself or links to the wrong path, and how to restore scheme, client IP and prefix without trusting forged headers.

AI Engineering15 min

Reset an Agent's Memory Without Losing Its Commitments in .NET

Conversation, read cache, domain rows and receipts have different owners. Reset an Agent Framework session, replay a SQLite reservation and get the original receipt back.

Performance & Data13 min

ASP.NET Waits with Low CPU: Find the Queue Before Changing the Pool

The same endpoint can queue at a semaphore or inside the thread pool. Read the counters and a real stack, measure what async changes, and build a permit gate that cannot leak.

Performance & Data12 min

Why Your .NET Payload Survives: Trace the Roots, Unlink and Drain

Follow the strong path that keeps a 16 MiB payload alive on .NET 10, find the second owner behind an unsubscribed event, and build a subscription that unlinks and drains safely.

Engineering Practice14 min

Refactor a Pricing Function Without Rewriting Its Rules

Pin a small C# pricing function with hand-calculated contract tests, refactor it with behavior frozen, make a one-predicate change and prove the tests catch real mistakes.

AI Engineering14 min

RAG or Broad Context: Was the Evidence Missing or Ignored?

The same wrong answer can mean the source never reached the model or the model ignored it. Score the packet and the answer separately in C# to know which part of the pipeline to fix.

AI Engineering15 min

A Citation Is a Pointer: Executable Checks for RAG Claims in C#

An exact citation can carry a wrong number, a misread exception or a lifted prohibition. Compile the policy into facts and verify typed claims in C#, with honest verdicts.