What is ASP.NET Core?

ASP.NET Core Fundamentals Basic Fresher1–2 Yrs Conceptual 2 min read

Quick Answer

ASP.NET Core is a free, open-source, cross-platform framework for building web apps, APIs and real-time services on .NET. It is a ground-up rewrite of ASP.NET that runs on Windows, Linux and macOS, is modular through NuGet, and has dependency injection, configuration and a middleware pipeline built in.

ASP.NET Core is the modern, cross-platform version of ASP.NET. It is a complete rewrite that isn't tied to IIS or Windows — it runs on Linux and in containers using the Kestrel web server. The big differences from classic ASP.NET are that dependency injection and configuration are built into the framework, the request is handled by a middleware pipeline you compose yourself, and MVC, Web API and Razor Pages are all one unified framework instead of separate stacks. In practice that means faster apps, smaller deployments and the same code running anywhere.

ASP.NET Core replaces the older ASP.NET Framework (System.Web) with a smaller, composable stack. Instead of one large System.Web.dll tied to IIS and Windows, you add only the packages you need, and the app can run behind Kestrel on any operating system.

Key characteristics interviewers look for:

  • Cross-platform — runs on the .NET runtime for Windows, Linux and macOS, and in containers.
  • Unified — MVC, Web API and Razor Pages share one framework and one Controller/routing model.
  • Dependency injection first — a container is part of the framework; the framework itself is built on it.
  • Middleware pipeline — the request flows through an ordered list of components you configure in Program.cs.
  • Configuration and options — layered configuration (JSON, environment variables, user secrets, command line) bound to strongly typed classes.
  • Hosting model — a generic host manages startup, shutdown, logging and DI for web and non-web workloads alike.

Since .NET 6 the boilerplate is condensed into a single top-level Program.cs using the minimal hosting model, though the concepts (services, middleware, endpoints) are unchanged.

Program.cs (minimal hosting)
var builder = WebApplication.CreateBuilder(args);

// register services in the DI container
builder.Services.AddControllers();
builder.Services.AddScoped<IEmployeeService, EmployeeService>();

var app = builder.Build();

// compose the middleware pipeline (order matters)
app.UseHttpsRedirection();
app.UseAuthentication();
app.UseAuthorization();
app.MapControllers();

app.Run();

  • Run .NET web apps on Linux and in containers, not just Windows/IIS
  • Pay-for-what-you-use: small, modular packages instead of one monolithic assembly
  • Higher throughput — Kestrel and the rewritten pipeline are significantly faster
  • One programming model for MVC, Web API, Razor Pages and SignalR
  • Testability — DI and interfaces everywhere make components easy to unit test