Return Retry-After when a client should back off

Tell API clients when another attempt may succeed instead of leaving them to guess a retry delay.

August 29, 2026 · 2 min · Lukas Walter

Treat CORS as a browser boundary, not API authorization

Use CORS to control browser-script access across origins, while enforcing API permissions with authentication and authorization.

August 2, 2026 · 2 min · Lukas Walter

Set request body limits intentionally

Choose global and endpoint-specific request body limits instead of inheriting accidental defaults for uploads and APIs.

July 29, 2026 · 3 min · Lukas Walter

Treat uploaded files as untrusted

Keep uploads quarantined until required metadata, content, and resource checks succeed, while treating client filenames as untrusted.

July 29, 2026 · 2 min · Lukas Walter

Use streaming for large or frequent uploads

Use MultipartReader when buffered ASP.NET Core uploads put too much pressure on memory, temporary-disk capacity, or disk I/O.

July 29, 2026 · 3 min · Lukas Walter

Keep public API DTOs separate from domain entities

Use explicit request and response contracts so persistence fields and domain state do not become part of the public API accidentally.

July 24, 2026 · 3 min · Lukas Walter

Choose rate-limiting policies by endpoint cost

Apply different ASP.NET Core rate limits to cheap reads and expensive AI or data-processing endpoints.

July 19, 2026 · 3 min · Lukas Walter

When an AI Request Should Become a Background Job

How to decide when a .NET AI request should stay synchronous, stream its response, or move to a durable background job with HTTP 202 and a status resource.

July 19, 2026 · 14 min · Lukas Walter

Cache GET responses only when user context is clear

Do not cache a GET response unless the cache key matches the user, tenant, and permission boundary that shaped it.

July 7, 2026 · 3 min · Lukas Walter

Middleware order is important

Place ASP.NET Core middleware in the order that matches routing, security, and endpoint behavior.

July 5, 2026 · 2 min · Lukas Walter