⚙️

Backend Technologies · .NET

ASP.NET Core — Free Learning Resources

Free, printable resources for ASP.NET Core — practice problems, quick-reference cheatsheet, and an interview prep sheet. No sign-up required.

📝Practice Worksheet

ASP.NET CorePractice Worksheet

Structured exercises and problems to build hands-on ASP.NET Core skills. Work through key concepts step by step.

📋Cheatsheet

ASP.NET CoreCheatsheet

One-page quick-reference for ASP.NET Core — key syntax, commands, patterns, and best practices at a glance.

🎯Interview Sheet

ASP.NET CoreInterview Sheet

Top ASP.NET Core interview questions with concise answers. Get ready for any technical round with this focused prep sheet.

About ASP.NET Core

ASP.NET Core is Microsoft's open-source, cross-platform web framework for building modern web apps and APIs with C#. It runs on Windows, Linux, and macOS, delivers high throughput (consistently top-5 in TechEmpower benchmarks), and unifies MVC, Razor Pages, gRPC, SignalR, and Minimal APIs in a single framework.

ASP.NET CoreCheat Sheet — What's Covered

  • Middleware pipeline — app.Use, app.Map, and built-in middleware
  • Dependency injection — IServiceCollection, lifetimes, and IOptions pattern
  • Controllers vs. Minimal APIs — when to use each
  • Authentication — JWT bearer, cookie auth, and ASP.NET Core Identity
  • Configuration, environment variables, and appsettings.json hierarchy

Frequently Asked Questions — ASP.NET Core

How does the ASP.NET Core middleware pipeline work?

Middleware components are chained in Program.cs using app.Use(). Each component calls next() to pass the request forward. Middleware runs in registration order on the way in and in reverse on the way out. Order matters — authentication must precede authorization.

What is the difference between Minimal APIs and Controller-based APIs?

Minimal APIs (app.MapGet, app.MapPost) are concise, functional-style route definitions ideal for simple services. Controller-based APIs add structure with attributes, model binding, filters, and action results — better for larger APIs with complex logic.

How does ASP.NET Core dependency injection work?

Register services in Program.cs: builder.Services.AddScoped<IRepo, Repo>(). Three lifetimes: Transient (new per injection), Scoped (one per HTTP request), Singleton (one for app lifetime). Inject via constructor parameters — the framework resolves automatically.

How do you implement JWT authentication in ASP.NET Core?

Add AddAuthentication().AddJwtBearer() in Program.cs, configure the token parameters (issuer, audience, key). Add app.UseAuthentication() and app.UseAuthorization() in the pipeline. Decorate controllers or endpoints with [Authorize].

What is the IOptions pattern?

IOptions<T> binds a configuration section to a strongly-typed class. Register with builder.Services.Configure<MySettings>(builder.Configuration.GetSection('MySettings')). Inject IOptions<MySettings> into services and access settings.Value.SomeProp. Use IOptionsSnapshot for per-request reload.

Who Is This For?

C# developers building REST APIs, web applications, or microservices on any platform who want a modern, high-performance .NET web framework.

Resource Details

FormatPDF, Printable
Cheat Sheet1 page, landscape
Interview Sheet10 questions + answer lines
Practice Sheet10 Q&A pairs with answers
PriceFree
Back to ASP.NET Core