ASP.NET Core glossary

89 ASP.NET Core terms, from Novice to Master. Start with the basics or jump to a level.

Updated

Novice

appsettings.json
The app's settings file; never put secrets in it.
ASP.NET Core
Microsoft's cross-platform framework for building web APIs and sites in C#.
dotnet new webapi
The CLI command that creates a new ASP.NET Core API project.
dotnet run
Builds and starts the project.
dotnet watch
Runs the app and reloads it automatically when you save code.
Kestrel
The web server built into ASP.NET Core.
launchSettings.json
Local run settings such as ports and the environment name.
Localhost and Ports
localhost is your own computer; the port tells apps apart.
Program.cs
The file where an ASP.NET Core app is configured and started.
WebApplication
The object representing the running web app; built, configured, then run.

Apprentice

[ApiController]
An attribute that turns on API behaviour like automatic 400s for bad input.
[FromBody]
Marks a parameter as coming from the JSON body.
[FromQuery]
Marks a parameter as coming from the query string.
[FromRoute]
Marks an action parameter as coming from the route, such as the 7 in /products/7.
Action Method
A controller method that handles one endpoint.
AddScoped, AddTransient, AddSingleton
The three ways to register a service, one per lifetime.
Attribute Routing
Declaring routes with attributes on controllers and methods.
Configuration
Settings merged from files, secrets, environment variables and the command line.
Controller
A class that groups related endpoints as methods.
Dependency Injection
The built-in system that hands registered services to the code that needs them.
Environment
Development, Staging or Production, set by ASPNETCORE_ENVIRONMENT.
IActionResult
A return type that lets an action send different responses.
ILogger
The built-in logging interface.
MapGet and MapPost
Methods that connect an HTTP method and URL to a handler.
Minimal API
Endpoints mapped straight to functions, without controller classes.
Model Binding
Filling handler parameters from the route, query, headers and body.
Model-View-Controller (MVC)
A pattern that splits a web app into models (data), views (HTML) and controllers (requests).
Results and TypedResults
Helpers that create minimal API responses like Ok and NotFound.
Route Parameter
A placeholder in the route whose value reaches your handler.
Route Template
A URL pattern with placeholders and constraints.
Service Lifetime
How long a registered service instance lives: transient, scoped or singleton.
Static Files
Files in wwwroot served as-is.
Swagger in ASP.NET Core
Built-in OpenAPI generation, viewed through a UI like Swagger UI.

Journeyman

[Authorize]
Requires a signed-in user, optionally with a role or policy.
Action Filter
Code that runs around controller actions, applied as an attribute.
ActionResult<T>
An action's return type that allows either its data (a T) or a status result such as NotFound().
Authentication Middleware
Middleware that works out who the caller is from their token or cookie.
Authorization Policy
A named rule about who is allowed to do something.
Claims and ClaimsPrincipal
Facts about the signed-in user, held by HttpContext.User.
Conventional Routing
Building every address in an MVC app from one pattern, such as {controller}/{action}/{id?}.
Cookie Authentication
Signing users in with an encrypted browser cookie.
CORS Policy
Rules for which other websites may call your API from a browser.
CreatedAtAction
A controller helper that answers 201 Created with the new item and a Location header pointing at it.
Data Annotations
Validation attributes on properties, like [Required] and [Range].
Endpoint Filter
Code that runs around specific minimal API handlers.
Endpoint Routing
Matching a request to its endpoint early so later middleware can see it.
Environment Variables in .NET
Settings supplied as environment variables, with __ for each colon.
Exception Handling Middleware
Middleware that turns unhandled exceptions into a clean error response.
Health Checks
An endpoint that reports whether the app and its dependencies work.
HttpClient Factory
The built-in way to create and configure HttpClient instances safely.
JWT Bearer Authentication
Validating a JWT sent in the Authorization header on each request.
Middleware
Code that runs on every request, in order, around your endpoints.
Model Validation
Checking incoming data against rules and returning 400 with errors.
ModelState
Where ASP.NET Core records how model binding and validation went; ModelState.IsValid says whether all is well.
Options Pattern
Binding configuration to a typed class injected as IOptions<T>.
PartialView()
A controller method that answers with just a partial view's HTML, without the layout.
Problem Details in ASP.NET Core
Returning errors in the standard Problem Details JSON shape.
Request Pipeline
The ordered chain of middleware every request passes through.
Route Constraint
A rule on a route value, such as {id:int}, that the address must match for the route to be used.
Route Groups
A shared URL prefix and settings for several minimal API endpoints.
Session State
Small values the server keeps for one visitor between requests, found again through a session cookie.
User Secrets
Development secrets stored outside the project so they are never committed.
WebApplicationFactory
Starts your app in memory for integration tests.

Freelancer

BackgroundService
A base class for long-running background work.
Cancellation Token in Requests
A token that is cancelled when the client disconnects.
Data Protection
The system that encrypts cookies and tokens; its keys must be shared across servers.
Forwarded Headers
Middleware that restores the real client IP and scheme behind a proxy.
Generic Host
The shared foundation for DI, config, logging and lifetime in .NET apps.
gRPC in .NET
Hosting fast binary gRPC services in ASP.NET Core.
Hosted Service
Background code that starts and stops with the app.
Identity
A ready-made user system with login, passwords and roles.
IExceptionHandler
An interface for a class that turns chosen unhandled exceptions into their own responses, across the whole app.
IHttpContextAccessor
Gives code outside a handler access to the current request.
Keyed Services
Several implementations of one service, chosen by key.
OpenAPI Document Generation
The OpenAPI description ASP.NET Core builds from your endpoints.
Output Caching
Storing whole responses on the server and replaying them.
Problem Details Service
The service that writes and customises Problem Details responses.
Rate Limiting Middleware
Middleware that caps requests per client and answers 429 beyond it.
Response Caching
Setting HTTP cache headers so clients and proxies can reuse responses.
Response Compression
Compressing responses so they download faster.
Reverse Proxy (YARP)
Microsoft's library for building reverse proxies and API gateways.
SignalR
Real-time two-way messaging between server and browsers.

Master

.NET Aspire
Tools for running and observing multi-service .NET apps together.
Endpoint Metadata
Information attached to an endpoint that middleware reads.
Kestrel Tuning
Adjusting Kestrel's limits, timeouts and protocols.
Minimal API Source Generators
Compile-time code generation for minimal API plumbing.
Native AOT for ASP.NET Core
Compiling an app into a fast-starting native executable.
OpenTelemetry in .NET
A standard way to collect traces, metrics and logs across services.
Request Delegate
A function taking HttpContext; the building block of the pipeline.

More subjects in Back-End Frameworks