How amdhazm/containerizing-an-asp.net-core-application works
This is a small ASP.NET Core MVC web application, presented in the README as an example for containerization. Its runtime workflow is an HTTP request entering the host, passing through configured middleware and controller routing, then receiving a controller-produced view. The sample also provides privacy and error pages and static assets. The excerpts establish host setup, routing, and controller behavior; view resolution and static-file-to-directory wiring are shown only by framework convention, so those links are marked unverified.
Main entry points: HomeController.cs Home controller · Startup.cs Middleware and routes · Program.cs Host entry · Home Home and privacy views
Components 9
Host and routing
- Host entry
Program.cs - Middleware and routes
Startup.cs
MVC pages
- Home controller
Controllers/HomeController.cs - Home and privacy views
Views/Home - Error view
Views/Shared/Error.cshtml - Shared layout
Views/Shared/_Layout.cshtml - Error request model
Models/ErrorViewModel.cs
Web assets
- Static assets
wwwroot
Other components
- Browser
Connections 8
- Browser → Host entry: sends request
- Host entry → Middleware and routes: configures host
Program.cs - Middleware and routes → Home controller: routes requests
Startup.cs - Home controller → Home and privacy views: renders views
- Home controller → Error view: renders error
- Home controller → Error request model: creates model
Controllers/HomeController.cs - Middleware and routes → Static assets: serves files
- Home and privacy views → Shared layout: uses layout