Mastering ASP.NET Core: 100 Essential Interview Questions for Senior Developers π
Introduction
ASP.NET Core has become the backbone of modern web development, offering cross-platform capabilities, high performance, and flexibility. For senior developers, mastering its concepts is crucial not only for building scalable applications but also for excelling in interviews. This blog organizes 100 commonly asked ASP.NET Core / .NET Core interview questions into structured sections, making it easier to study and prepare.
1. .NET Core Basics
What is .NET Core?
Difference between .NET Framework and .NET Core?
Difference between .NET Core and .NET 8/9?
What is Kestrel?
What is middleware in .NET Core?
Explain request pipeline.
How does appsettings.json work?
Difference between appsettings.json and environment variables?
What is launchSettings.json?
What is hosting in .NET Core?
2. Startup / Program.cs
What is Program.cs?
Difference between builder.Services and app?
What is WebApplicationBuilder?
Difference between ConfigureServices and Configure in old versions?
How configuration is loaded?
How environment-specific config works?
What is IHostBuilder?
What is IWebHostBuilder?
How dependency injection is configured?
How logging is configured?
3. Middleware
What is middleware?
How custom middleware works?
Order of middleware execution?
Difference between Use, Run, and Map?
What is exception middleware?
What is authentication middleware?
What is authorization middleware?
What is static file middleware?
What is endpoint middleware?
How to short-circuit middleware?
4. Dependency Injection
What is DI?
Explain IoC container.
What are service lifetimes?
Difference between Singleton, Scoped, Transient?
What happens if Scoped injected into Singleton?
What is IServiceProvider?
What is IServiceScopeFactory?
How to resolve service manually?
How to use multiple implementations?
What is circular dependency?
5. Routing / Controllers / API
What is routing?
Attribute routing vs conventional routing?
What is model binding?
What is model validation?
What is [ApiController]?
Difference between IActionResult and ActionResult?
Difference between Ok(), Created(), NoContent()?
What is FromBody / FromQuery / FromRoute?
What is API versioning?
What is Minimal API?
6. Authentication / Authorization
What is authentication?
What is authorization?
How JWT works?
What is bearer token?
How to validate token?
What is OAuth2?
What is OpenID Connect?
Role-based authorization?
Policy-based authorization?
Claims-based authorization?
7. Security
What is CORS?
What is CSRF?
What is XSS?
What is SQL Injection?
What is HTTPS redirection?
What is HSTS?
What is rate limiting?
How to secure API?
What is API key auth?
What is mTLS?
8. Logging / Monitoring
What logging providers exist?
What is ILogger?
What is Serilog / NLog?
Structured logging?
Correlation ID?
Health checks?
Application Insights?
OpenTelemetry?
Distributed tracing?
How to monitor production issue?
9. Performance / Caching
What is response caching?
What is output caching?
What is distributed caching?
Difference between IMemoryCache and Redis?
How to improve API performance?
What is compression middleware?
What is async API action?
What causes thread starvation?
What is connection pooling?
What is object pooling?
10. Deployment / Hosting
How to deploy .NET Core app?
IIS vs Kestrel?
Reverse proxy?
Dockerize .NET Core app?
Environment variables in deployment?
CI/CD for .NET Core?
Blue-green deployment?
Rolling deployment?
How to troubleshoot production crash?
How to scale .NET Core API?
Conclusion
These 100 questions cover the breadth of ASP.NET Core knowledge expected from senior developers. From basics and middleware to advanced deployment strategies and security practices, this list serves as a comprehensive guide for interview preparation. By mastering these topics, you’ll not only be ready for interviews but also equipped to build robust, scalable, and secure applications in real-world scenarios.
This was part of Interview Preparation With Bipin — Let’s Crack It!
Comments
Post a Comment