ASP.NET Core
news

64stories

Stories

DPoP
Bind tokens to keys
DSDuende Software Blog Joe DeCock Oct 26

DPoP explained: binding OAuth tokens to a client key

Duende's Halloween-themed walkthrough explains DPoP, the RFC 9449 extension that binds access tokens to a client's key pair. Binding stops a stolen bearer token from being replayed against an API. The post follows the token request, the cnf.jkt claim and the proof check on the API side, and it maps each step to Duende's .NET libraries.

ASP.NET Core
Test 404 without a server
DVDEV Community: #aspnetcore Sukhpinder Singh Oct 25

Test Minimal API 404 branches without booting a server

The author shows how to test the 404 branch of a minimal API endpoint by calling the handler directly instead of booting WebApplicationFactory. Typed result unions such as Results<Ok<T>, NotFound> make the return type a compiler-checked contract. The approach gives fast, readable unit tests, while the author keeps a thin layer of integration tests for routing, binding and middleware.

ASP.NET Core
Polish Razor Page CRUD
DVDEV Community: #dotnetcore Karen Payne Oct 25

Improving scaffolded Razor Pages with EF Core, Bootstrap icons and a delete dialog

Karen Payne shows how to improve the Razor Pages that Visual Studio generates for an EF Core model reverse-engineered from SQL Server. The main change is replacing table-based lists with Bootstrap div layouts, swapping text links for icon buttons, and using a Bootstrap modal instead of a separate delete page. It is a practical starting point for ASP.NET Core developers who want more responsive and WCAG AA friendlier list pages.

ASP.NET Core 10
Refuse bad requests well
DVDEV Community: #aspnetcore MICHAEL-MAURICE Oct 24

Six Requests a Minimal API Should Refuse, and Their Status Codes

How should a warehouse order API refuse illegal state changes, short stock, stale ETag writes and malformed JSON? The author builds a pick-pack-ship demo on .NET 10 Minimal APIs and EF Core 10, mapping each refusal to a specific status code, such as 409, 412 and 400. He also explains why an exact retry should return 200 instead of an error. A useful guide for anyone designing workflow endpoints.

ASP.NET Core
Revoke tokens instantly
MJMilan Jovanović milan@milanjovanovic.tech (Milan Jovanović) Oct 24

How to Revoke a JWT Before It Expires in ASP.NET Core

ASP.NET Core validates a JWT by its signature and expiry, so a stolen token keeps working after a password change. The article walks through two fixes: short-lived access tokens paired with revocable refresh tokens, then a token_version check for immediate revocation. Every .NET developer running JWT-based APIs should know where the gap is and what each fix costs.

ASP.NET Core 10
Fix common API mistakes
DVDEV Community: #aspnetcore Pankaj Singh Oct 23

Six common ASP.NET Core Web API mistakes and the patterns to use instead

A developer who has maintained ASP.NET Core APIs for years lists six recurring problems: scattered try/catch blocks, unbounded list queries, ignored cancellation tokens, lost UTC kinds, late config failures and unprotected login endpoints. Each comes with a suggested pattern using .NET 10 and EF Core 10, noted to work on .NET 8 with small changes.

ASP.NET Core 10
Wrong page from cache
DVDEV Community: #aspnetcore Sukhpinder Singh Oct 22

SetVaryByQuery Can Make ASP.NET Core Output Cache Serve Wrong Pages

The article explains how calling SetVaryByQuery in an ASP.NET Core output cache policy replaces the default vary-by-all-query-keys behavior. A policy that names only sort stops varying by page, so different pages can receive the same cached body. The author reproduces the bug with a small test and shows the fix.

ASP.NET Core 10
Headers are not server cache
DVDEV Community: #aspnetcore Sukhpinder Singh Oct 22

Cache-Control Header Is Not Output Caching: A Handler Counter Test

The author compares a Cache-Control header with ASP.NET Core output caching using a handler counter. The header only instructs clients and proxies, so the handler ran on all ten calls, while output caching stored the response on the server and ran the handler once. It is a concrete warning for anyone who thinks a cache header caches on the server.

ASP.NET Core
Server time in DevTools
MBMaarten Balliauw Maarten Balliauw Oct 22

Server-Timing Headers in ASP.NET Core: Backend Metrics in Browser DevTools

Maarten Balliauw shows how to add a Server-Timing response header in ASP.NET Core so database and external API timings appear in browser DevTools next to the network timings. The post builds a small middleware, a measurement feature that endpoints can use, and ways to reuse OpenTelemetry Activity data. It also covers gating the header so internal timings are not exposed to every caller.

ASP.NET Core SignalR
Messages across servers
CCC# Corner Ananya Desai Oct 21

How to Scale SignalR Applications Across Multiple Servers

This guide explains how to scale ASP.NET Core SignalR across several servers using either a Redis backplane or Azure SignalR Service. It covers why messages fail to reach clients on other servers, how each option distributes them, and when sticky sessions are still needed. It is a practical starting point for teams moving real-time apps into production.

Feedback

Found a bug or have an idea? Your message lands straight in my inbox.

Type of message