Introduction
ASP.NET Core is Microsoft's free, open-source framework for building modern web applications, REST APIs, and real-time services using C#. If you have ever visited a bank portal, an e-commerce checkout page, or an internal HR tool at a large Indian IT company, there is a strong chance the backend was built with .NET.
For freshers targeting campus drives at TCS, Infosys, Wipro, Cognizant, or Capgemini, ASP.NET Core is one of the most requested skills on job descriptions — especially for full-stack and backend roles. Mid-level developers use it to ship APIs consumed by Angular, React, or mobile apps. Senior engineers architect microservices, secure multi-tenant SaaS products, and deploy to Azure at scale.
Throughout this 75-article series you will build ShopNest — a portfolio-ready e-commerce platform (products, orders, customers, reviews, cart). This first lesson explains what ASP.NET Core is, how it evolved from .NET Framework, and how to run your first app.
After reading this article you will
- Explain ASP.NET Core to an interviewer in under 60 seconds
- Compare .NET Framework, .NET Core, and modern .NET 8/9
- Create a Hello World project and understand every generated file
- Know why Indian enterprises migrated to Core for cross-platform and cloud
- Start ShopNest with the correct solution structure
Prerequisites
- Knowledge: Basic computer literacy; C# helps but is not mandatory for this intro
- Software: .NET 8 SDK, Visual Studio 2022 Community or VS Code + C# Dev Kit
- Optional: C# Programming Tutorial on Toolliyo
- Time: 20 min reading + 30 min hands-on
Concept deep-dive
Level 1 — Analogy
Think of ASP.NET Core as a fully equipped kitchen in a cloud-ready restaurant. .NET Framework was a kitchen built into one building (Windows only). ASP.NET Core is a modular kitchen you can install on Windows, Linux, or macOS, plug into Docker containers, and scale when more customers (HTTP requests) arrive.
Level 2 — Technical
ASP.NET Core sits on top of the .NET runtime. It provides:
- Kestrel — a cross-platform web server
- Middleware pipeline — composable request processing
- Dependency injection — built into the host
- Unified stack — MVC, Razor Pages, Web API, gRPC, SignalR
It solves vendor lock-in to IIS, improves performance versus legacy ASP.NET, and aligns with cloud-native deployment (Kubernetes, Azure App Service, AWS).
Level 3 — Architecture
[Browser / Mobile App]
↓ HTTPS
[Kestrel Web Server]
↓
[Middleware Pipeline — auth, routing, logging]
↓
[Controller / Minimal API Endpoint]
↓
[Service Layer — business rules]
↓
[EF Core / External APIs]
↓
[SQL Server / Redis / Azure Storage]
.NET version timeline (ASCII)
2002 .NET Framework 1.0 (Windows, System.Web, IIS)
2016 .NET Core 1.0 (Cross-platform, Kestrel, modular)
2020 .NET 5 (Unified branding — drop "Core" name)
2021 .NET 6 LTS (Minimal hosting, hot reload)
2022 .NET 7
2023 .NET 8 LTS (Native AOT improvements, Blazor)
2024 .NET 9 (HybridCache, OpenAPI defaults)
Common misconceptions
❌ MYTH: ASP.NET Core is only for Windows servers.
✅ TRUTH: It runs on Linux Docker containers — most Azure and AWS .NET workloads use Linux for lower cost.
❌ MYTH: You must learn .NET Framework first.
✅ TRUTH: New learners should start with .NET 8/9; Framework is maintenance mode for legacy apps.
❌ MYTH: .NET jobs in India are declining.
✅ TRUTH: Banking, ERP, healthcare, and government projects still hire heavily; full-stack .NET + Angular/React remains common in service companies.
Career scope in India (indicative)
| Level | Typical role | Experience | Indicative salary (2025–26) |
|---|---|---|---|
| Fresher | Trainee / Associate | 0–1 yr | ₹3.5–6 LPA (service cos.) |
| Junior | Software Engineer | 1–3 yr | ₹6–12 LPA |
| Mid | Senior Engineer | 3–5 yr | ₹12–22 LPA |
| Senior | Architect / Lead | 5+ yr | ₹22–40+ LPA |
Salaries vary by city (Bangalore, Pune, Hyderabad, NCR), product vs service, and skills (Azure, microservices, AI integration).
Hands-on: Hello ShopNest
Step 1 — Create the project
dotnet --version # expect 8.x or 9.x
dotnet new webapp -n ShopNest.Web -o ShopNest.Web
cd ShopNest.Web
dotnet run
Open https://localhost:7xxx — you should see the default template.
Step 2 — Files explained
| File / folder | Purpose |
|---|---|
Program.cs | App entry — registers services and middleware (replaces old Startup.cs) |
appsettings.json | Configuration — connection strings, logging levels |
appsettings.Development.json | Dev-only overrides (detailed errors) |
ShopNest.Web.csproj | Target framework (net8.0), NuGet packages |
Properties/launchSettings.json | Local URLs and environment name |
wwwroot/ | Static files — CSS, JS, images |
Pages/ or Controllers/Views/ | UI (Razor Pages or MVC) |
Step 3 — Minimal Program.cs (.NET 8)
// File: ShopNest.Web/Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages(); // or AddControllersWithViews() for MVC
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.MapRazorPages(); // or app.MapControllerRoute(...)
app.Run();
Step 4 — First custom page (ShopNest welcome)
// File: Pages/Index.cshtml.cs
public class IndexModel : PageModel
{
public string StoreName { get; } = "ShopNest";
public string Tagline { get; } = "Your .NET 8 e-commerce learning project";
}
<!-- File: Pages/Index.cshtml -->
@page
@model IndexModel
<h1>Welcome to @Model.StoreName</h1>
<p>@Model.Tagline</p>
Step 5 — Verify
Run dotnet run, refresh the browser, and confirm the ShopNest heading. You have a running ASP.NET Core app — the foundation for all 74 following articles.
Real-world scenarios
Scenario 1 — Company marketing site (fresher): Static pages + contact form on Azure App Service F1 tier (~₹0–800/month).
Scenario 2 — Internal HR portal (mid-level): MVC + Identity + SQL Server on company VPN; integrates with Active Directory.
Scenario 3 — High-traffic B2C (senior): API + Redis cache + CDN for product images; Linux containers on Kubernetes with horizontal pod autoscaling.
Interview questions
Fresher (campus / TCS / Infosys)
Q1: What is ASP.NET Core?
A: Open-source cross-platform framework for web apps and APIs on .NET. Uses Kestrel, middleware pipeline, and built-in DI — unlike .NET Framework which was Windows/IIS only.
Q2: Difference between ASP.NET Core and .NET Framework?
A: Core is cross-platform, modular, faster, and actively developed. Framework uses System.Web and is Windows-centric maintenance mode.
Q3: What is Kestrel?
A: Cross-platform web server built into ASP.NET Core. Can run standalone or behind IIS/nginx as reverse proxy.
Q4: What is middleware?
A: Components in the HTTP pipeline that process requests/responses — e.g. authentication, routing, static files. Order matters.
Q5: What file is the entry point in .NET 6+?
A: Program.cs with top-level statements or explicit Main.
Q6: Is ASP.NET Core free?
A: Yes — open source (MIT). Visual Studio Community is free for individuals and small teams.
Junior / mid (1–3 years)
Q7: Explain the request pipeline.
A: Request hits Kestrel → middleware chain → routing → endpoint (controller/minimal API) → response. Each middleware can short-circuit or call next.
Q8: MVC vs Web API vs Razor Pages — when to use?
A: MVC for server-rendered HTML apps; Web API for JSON/mobile backends; Razor Pages for page-focused apps with less ceremony than MVC.
Q9: How do you configure environments?
A: ASPNETCORE_ENVIRONMENT, appsettings.{Environment}.json, and IWebHostEnvironment.
Q10: Why migrate from Framework to Core?
A: Performance, Linux hosting cost, container support, long-term support releases, unified .NET platform.
Senior (3+ years)
Q11: When would you NOT choose ASP.NET Core?
A: Hard dependency on legacy System.Web controls, COM interop constraints, or team with zero .NET capacity — otherwise rare for greenfield.
Q12: How does ASP.NET Core fit in microservices?
A: Lightweight hosts, health checks, OpenTelemetry, container-first, gRPC/REST, worker services for background jobs.
Q13: Compare hosting models on Azure.
A: App Service (PaaS, easy), AKS (Kubernetes control), Container Apps (scale-to-zero), Functions (event-driven) — trade cost vs ops burden.
Coding round
Problem: Reverse a string in C# without using Array.Reverse.
static string Reverse(string input)
{
if (string.IsNullOrEmpty(input)) return input;
var chars = input.ToCharArray();
int left = 0, right = chars.Length - 1;
while (left < right)
{
(chars[left], chars[right]) = (chars[right], chars[left]);
left++; right--;
}
return new string(chars);
}
// Time O(n), Space O(n)
Summary
- ASP.NET Core is the modern, cross-platform web stack for .NET 8/9
- It replaces .NET Framework for new web and API projects
- Indian IT hires heavily for .NET full-stack and backend roles
- ShopNest starts with
dotnet new webappand grows across 75 lessons - Next: development environment setup and tooling
Next lesson: Setting Up ASP.NET Core Development Environment
FAQ
What is ASP.NET Core used for?
Building websites, REST APIs, real-time apps (SignalR), and microservices with C#. Used by enterprises, startups, and government projects worldwide.
Is ASP.NET Core good for beginners in India?
Yes — strong campus hiring, clear career path to full-stack and cloud roles, and excellent documentation from Microsoft and Toolliyo's ShopNest series.
Do I need to pay for ASP.NET Core?
No. The framework and SDK are free and open source. You pay only for hosting (Azure, AWS) or SQL Server licenses if applicable.