Skip to main content
SEMastery

ASP.NET

Explore asp.net topics and best practices in the .NET ecosystem.

Level:
61 articles
beginner

Top 15 Mistakes Developers Make When Creating Web APIs

A warm, beginner-friendly tour of the 15 most common Web API mistakes in ASP.NET Core, with simple fixes, diagrams, tables, and clear C# examples.

12 minASP.NET Core · Web API
intermediate

How to Increase the Performance of Web APIs in .NET

A friendly, step-by-step guide to making your ASP.NET Core Web APIs fast: async, caching, query tuning, compression, and pooling in .NET 10.

11 minASP.NET Core · performance
beginner

Refit in .NET: Building Robust API Clients in C#

Learn Refit in .NET to build type-safe REST API clients in C#. Define an interface, add attributes, and Refit writes the HttpClient code for you.

12 minRefit · ASP.NET Core
beginner

Integrate Keycloak with ASP.NET Core Using OAuth 2.0

A beginner-friendly guide to securing an ASP.NET Core API and web app with Keycloak using OAuth 2.0 and OpenID Connect, with diagrams, tables, and copy-paste code.

11 minASP.NET Core · Keycloak
intermediate

Refresh Tokens and Token Revocation in ASP.NET Core: A Beginner Guide

Learn refresh tokens and token revocation in ASP.NET Core with simple words, diagrams, and code. Short access tokens, rotation, reuse detection, and safe logout.

13 minASP.NET Core · refresh token
beginner

HTTPS Redirection and HSTS in ASP.NET Core: A Simple Guide

Learn how to configure HTTPS redirection and HSTS in ASP.NET Core with simple examples, diagrams, and clear advice for development and production.

11 minASP.NET Core · HTTPS
beginner

Scheduling Background Jobs with Quartz.NET in ASP.NET Core

Learn Quartz.NET step by step in ASP.NET Core: jobs, triggers, cron schedules, dependency injection, and database persistence, explained for beginners.

12 minquartz-net · aspnet-core
intermediate

API Versioning Should Be Your Last Resort in ASP.NET Core

Learn why API versioning in ASP.NET Core should be your last resort, how to make backward-compatible changes first, and how to version cleanly when you must.

13 minaspnet-core · api-design
beginner

CORS in ASP.NET Core: A Comprehensive Guide

A simple, friendly guide to CORS in ASP.NET Core. Learn how the browser, preflight requests, and policies work, with clear diagrams, tables, and code.

11 minASP.NET Core · CORS
beginner

Real-Time Server-Sent Events in ASP.NET Core and .NET 10

Learn Server-Sent Events (SSE) in ASP.NET Core and .NET 10 with the new TypedResults.ServerSentEvents API, explained simply for beginners.

12 minserver-sent-events · aspnet-core
intermediate

Authentication and Authorization Best Practices in ASP.NET Core

A friendly guide to authentication and authorization in ASP.NET Core for .NET 10 — JWT, cookies, claims, roles, policies, and security best practices with diagrams.

12 minASP.NET Core · authentication
beginner

Response Compression in ASP.NET Core: A Beginner's Guide

Learn how response compression works in ASP.NET Core. Shrink Gzip and Brotli responses, speed up your API, and avoid common pitfalls.

11 minaspnetcore · performance
intermediate

Building Fast Serverless APIs With Minimal APIs on AWS Lambda

Learn to run ASP.NET Core Minimal APIs on AWS Lambda for fast, cheap serverless APIs. Covers setup, cold starts, Native AOT, and .NET 10 with diagrams and code.

14 minASP.NET Core · Minimal APIs
beginner

Problem Details for ASP.NET Core APIs: A Beginner's Guide

Learn Problem Details in ASP.NET Core step by step. Give your API one clean error format with RFC 9457, AddProblemDetails, and IExceptionHandler in .NET 10.

12 minASP.NET Core · Problem Details
intermediate

API Versioning in ASP.NET Core: A Friendly, Complete Guide

Learn API versioning in ASP.NET Core with simple examples. URL, query string, header, and media type versioning explained with diagrams, code, and OpenAPI tips.

12 minASP.NET Core · API versioning
intermediate

ASP.NET Core Output Cache: Speed Up Your API with In-Memory and Redis

Learn ASP.NET Core output caching the easy way: cache whole API responses in memory or in Redis, set policies, vary by query, and clear with tags — with diagrams and code.

12 minASP.NET Core · output cache
beginner

How to Implement Caching Strategies in .NET: A Beginner-Friendly Guide

Learn caching strategies in .NET with simple examples: in-memory cache, distributed Redis cache, and HybridCache, plus eviction, stampede protection, and tags.

12 minASP.NET Core · caching
intermediate

How to Implement Two-Factor Authentication in ASP.NET Core

Learn how to add two-factor authentication (2FA) to ASP.NET Core with Identity and TOTP authenticator apps. QR codes, recovery codes, diagrams, and clear code.

11 minASP.NET Core · two-factor authentication
beginner

TickerQ: The Modern .NET Job Scheduler That Beats Quartz and Hangfire

Learn TickerQ, the fast, reflection-free .NET job scheduler with cron and time jobs, EF Core storage, retries, and a live dashboard, explained for beginners.

14 mintickerq · aspnet-core
beginner

How to Easily Create PDF Documents in ASP.NET Core

A simple, friendly guide to creating PDF documents in ASP.NET Core with QuestPDF, with clear code, diagrams, tables, and tips for invoices and reports.

11 minASP.NET Core · PDF
advanced

Advanced Rate Limiting Use Cases in .NET: A Friendly Deep Dive

Go beyond the basics of ASP.NET Core rate limiting: per-user limits, chained limiters, friendly 429 responses, Redis for many servers, and tier-based rules.

12 minASP.NET Core · rate limiting
beginner

Getting Started with FastEndpoints for Building Web APIs in .NET

A friendly beginner guide to FastEndpoints in .NET. Learn the REPR pattern, build your first endpoint, add validation, and see how it compares to controllers.

11 minASP.NET Core · FastEndpoints
beginner

How to Structure Minimal APIs in ASP.NET Core (.NET 10)

Learn how to structure Minimal APIs in ASP.NET Core with route groups, endpoint files, DTOs, TypedResults, and filters. Beginner-friendly with diagrams.

13 minASP.NET Core · Minimal APIs
beginner

Running Background Tasks in ASP.NET Core: A Beginner's Guide

Learn background tasks in ASP.NET Core with simple examples: IHostedService, BackgroundService, timers, scoped services, and a queue using Channels, with clear diagrams.

12 minASP.NET Core · BackgroundService
intermediate

Productive Web API Development with FastEndpoints and Vertical Slice Architecture in .NET

Learn how FastEndpoints and Vertical Slice Architecture work together to build clean, fast, and easy-to-grow web APIs in .NET 10, step by step.

14 minASP.NET Core · FastEndpoints
beginner

How to Create Custom Middlewares in ASP.NET Core (Step by Step)

Learn to build custom middleware in ASP.NET Core three ways: inline Use, a convention class, and IMiddleware with DI. Beginner friendly, with clear examples.

13 minASP.NET Core · middleware
intermediate

The Right Way to Use HttpClient in .NET (Beginner Guide)

Learn the right way to use HttpClient in .NET. Avoid socket exhaustion and stale DNS with IHttpClientFactory, typed clients, and resilience.

11 minhttpclient · ihttpclientfactory
beginner

Adding Real-Time Functionality to .NET Apps with SignalR

Learn ASP.NET Core SignalR step by step: hubs, clients, groups, and scaling with Redis or Azure, explained for absolute beginners.

11 minsignalr · aspnet-core
intermediate

Improving ASP.NET Core Dependency Injection with Scrutor

Learn how Scrutor makes ASP.NET Core dependency injection easier with assembly scanning and decoration, explained in simple, beginner-friendly steps.

11 minaspnet-core · dependency-injection
beginner

Getting Started with Hot Chocolate GraphQL in ASP.NET Core

A friendly beginner guide to building a GraphQL API in ASP.NET Core with Hot Chocolate. Learn queries, mutations, resolvers, and DataLoaders with simple examples.

13 minASP.NET Core · GraphQL
intermediate

HybridCache in ASP.NET Core: The New Caching Library Explained

Learn HybridCache in ASP.NET Core the simple way: two-level caching, stampede protection, tag invalidation, GetOrCreateAsync, and Redis setup with clear diagrams.

11 minASP.NET Core · HybridCache
beginner

Best Practices for Building REST APIs in ASP.NET Core

A friendly, beginner guide to REST API best practices in ASP.NET Core with naming, status codes, validation, ProblemDetails, paging, versioning, security, and code.

13 minASP.NET Core · REST API
intermediate

Scaling SignalR With a Redis Backplane in ASP.NET Core

Learn how a Redis backplane lets your ASP.NET Core SignalR app run on many servers so every connected user still gets every real-time message.

12 minsignalr · redis
beginner

The 5 Most Common REST API Design Mistakes (and How to Avoid Them)

A warm beginner guide to the 5 most common REST API design mistakes in ASP.NET Core, with simple fixes, diagrams, tables, and clear C# code examples.

13 minASP.NET Core · REST API
beginner

Global Error Handling in ASP.NET Core 8 (Beginner Guide)

Learn global error handling in ASP.NET Core 8 with IExceptionHandler, ProblemDetails, and UseExceptionHandler, explained with simple diagrams and clear code.

12 minASP.NET Core · error handling
beginner

Getting Started With Middlewares in ASP.NET Core (Beginner Guide)

A friendly beginner guide to middleware in ASP.NET Core: how the request pipeline works, Use vs Run vs Map, order, and writing your own middleware.

13 minASP.NET Core · middleware
intermediate

API Key Authentication in ASP.NET Core: The Secure Way

Learn how to add API key authentication to your ASP.NET Core API the right way. Use an AuthenticationHandler, hash keys, compare safely, and follow 2026 security best practices, with diagrams and code.

11 minASP.NET Core · API key
beginner

Master Configuration in ASP.NET Core with the Options Pattern

Learn the ASP.NET Core options pattern step by step: bind appsettings, use IOptions, IOptionsSnapshot, IOptionsMonitor, and validate config safely.

11 minaspnet-core · options-pattern
intermediate

Large File Uploads and Downloads in Azure Blob Storage with .NET

Learn to upload and download large files to Azure Blob Storage in .NET using block blobs, streaming, chunked transfers, and SAS tokens — with simple diagrams and code.

12 minASP.NET Core · Azure
beginner

Server-Sent Events in ASP.NET Core and .NET 10

Learn Server-Sent Events in ASP.NET Core .NET 10 with TypedResults.ServerSentEvents and IAsyncEnumerable, explained simply for beginners.

12 minserver-sent-events · aspnet-core
beginner

How to Be More Productive When Creating CRUD APIs in .NET

Learn simple, modern ways to build CRUD APIs faster in .NET 10. Scaffolding, minimal APIs, EF Core, DTO mapping, and reusable patterns explained for beginners.

11 minASP.NET Core · CRUD
intermediate

Master Claims Transformation for Flexible ASP.NET Core Authorization

Learn claims transformation in ASP.NET Core to enrich the user identity and build flexible, policy-based authorization with IClaimsTransformation.

11 minaspnetcore · authorization
intermediate

Options Pattern Validation in ASP.NET Core With FluentValidation

Validate the options pattern in ASP.NET Core using FluentValidation, IValidateOptions, and ValidateOnStart. Simple steps, diagrams, and full code examples.

12 minASP.NET Core · options pattern
beginner

Make Your ASP.NET Core Web API 18x Faster with HybridCache

Learn how HybridCache in .NET 9 speeds up your ASP.NET Core Web API up to 18x, with L1/L2 caching, stampede protection, and tags, explained simply.

11 minhybridcache · aspnet-core
intermediate

Rate Limiting in ASP.NET Core: A Simple, Complete Guide

Learn rate limiting in ASP.NET Core with simple examples. Understand fixed window, sliding window, token bucket, and concurrency limiters, with diagrams, code, and real-world advice on which to pick.

11 minASP.NET Core · rate limiting
intermediate

Global Error Handling in ASP.NET Core: From Middleware to Modern Handlers

Learn global error handling in ASP.NET Core step by step: from try-catch middleware to IExceptionHandler and Problem Details, with simple diagrams and clear code.

13 minASP.NET Core · error handling
beginner

How to Create and Convert PDF Documents in ASP.NET Core

Learn to create and convert PDF documents in ASP.NET Core using QuestPDF and HTML-to-PDF tools, with simple code, diagrams, and clear advice.

11 minASP.NET Core · PDF
intermediate

Caching in ASP.NET Core: Make Your App Fast (The Easy Way)

Learn caching in ASP.NET Core with simple examples. Understand in-memory cache, distributed Redis cache, HybridCache, and output cache, with diagrams, code, and clear advice on which to use and when.

11 minASP.NET Core · caching
intermediate

Building Secure APIs with Role-Based Access Control in ASP.NET Core

Learn role-based access control (RBAC) in ASP.NET Core. Add roles to JWT tokens, guard endpoints with policies, and return correct 401 and 403 codes, with diagrams and code.

12 minASP.NET Core · RBAC
intermediate

Building Async APIs in ASP.NET Core the Right Way

Learn to build fast, safe async APIs in ASP.NET Core: async/await, CancellationToken, avoiding .Result deadlocks, and thread pool tips.

12 minaspnetcore · async
intermediate

Solving Distributed Cache Invalidation with Redis and HybridCache

Learn how Redis and HybridCache solve distributed cache invalidation in ASP.NET Core with tags, backplanes, and a simple kitchen-counter analogy.

12 minaspnet-core · hybridcache
intermediate

Better Request Tracing with User Context in ASP.NET Core

Learn how to trace requests in ASP.NET Core by adding user context and correlation IDs to your logs using middleware, logging scopes, and Activity.

12 minaspnet-core · logging
intermediate

90% of APIs Are Not RESTful: What You're Missing and When It Matters

Most APIs called RESTful are really Level 2. Learn what real REST means, the Richardson Maturity Model, HATEOAS in ASP.NET Core, and when it matters.

11 minASP.NET Core · REST
beginner

3 Ways To Create Middleware In ASP.NET Core (Beginner Guide)

Learn the 3 ways to create middleware in ASP.NET Core: inline request delegates, convention-based classes, and factory-based IMiddleware, with simple diagrams and code.

12 minASP.NET Core · middleware
beginner

How to Use the Options Pattern in ASP.NET Core 7

A beginner-friendly guide to the options pattern in ASP.NET Core: bind appsettings to classes, and pick between IOptions, IOptionsSnapshot, and IOptionsMonitor.

12 minASP.NET Core · options pattern
advanced

Scheduling Background Jobs with Quartz.NET: Advanced Concepts

Go deeper with Quartz.NET in .NET 10: persistent job stores, clustering, misfire handling, cron triggers, calendars, and safe retries for real production jobs.

15 minASP.NET Core · Quartz.NET
intermediate

Extending HttpClient With Delegating Handlers in ASP.NET Core

Learn how DelegatingHandlers build a middleware pipeline for HttpClient in ASP.NET Core to add logging, auth, and retries with IHttpClientFactory.

12 minASP.NET Core · HttpClient
intermediate

Adding Validation to the Options Pattern in ASP.NET Core

Learn to validate the options pattern in ASP.NET Core using data annotations, IValidateOptions, ValidateOnStart, and source generation, with simple examples and diagrams.

11 minASP.NET Core · options pattern
intermediate

Using Scoped Services From Singletons in ASP.NET Core

Learn the safe way to use scoped services inside a singleton in ASP.NET Core using IServiceScopeFactory, with simple examples and clear diagrams.

12 minaspnetcore · dependency-injection
intermediate

Automatically Register Minimal APIs in ASP.NET Core

Learn to auto-register Minimal API endpoints in ASP.NET Core using the IEndpoint pattern, assembly scanning, and source generators. With diagrams and code.

13 minASP.NET Core · Minimal APIs
intermediate

How to Add JWT Authentication to SignalR Hubs in ASP.NET Core

A beginner-friendly guide to securing SignalR hubs with JWT tokens in ASP.NET Core, including the access_token query string trick and the [Authorize] attribute.

12 minsignalr · jwt