← .NET Core learning path.NET Core · Module 3 of 10
ASP.NET Core fundamentals
Understand Program.cs, hosting and the request pipeline.
📖 Key ideas
- Program.cs builds and configures the app: var builder = WebApplication.CreateBuilder(args).
- Kestrel is the built-in cross-platform web server.
- app.MapGet("/", () => "Hello") creates a minimal API endpoint.
- Configuration from appsettings.json, environment variables and user secrets.
- Environments: Development, Staging, Production.
💡 Real-life example: Program.cs is the opening checklist of a shop: hire staff (services), set up counters (middleware), open doors (run).
Program.csApp entry and configuration
KestrelBuilt-in web server
Minimal APILightweight endpoints with MapGet etc.
appsettings.jsonConfiguration file