ASP.NET Core Interview Questions

 

Basic ASP.NET Core Interview Questions

  1. What is ASP.NET Core and how is it different from ASP.NET Framework?

  2. What are the main features of ASP.NET Core?

  3. Explain the difference between Kestrel and IIS.

  4. What is Middleware in ASP.NET Core? How is it different from HttpModules/HttpHandlers in ASP.NET?

  5. What is the Startup.cs file and its significance?

  6. How does dependency injection work in ASP.NET Core?

  7. What are the different lifetimes available for dependency injection (Transient, Scoped, Singleton)?

  8. What is the difference between IApplicationBuilder and IServiceCollection?

  9. What is the role of Program.cs in ASP.NET Core 6 and later versions?

  10. Explain the concept of configuration in ASP.NET Core. How can you read from appsettings.json?

Intermediate ASP.NET Core Interview Questions

  1. What is the difference between WebHostBuilder and GenericHostBuilder?

  2. How is routing handled in ASP.NET Core? (Conventional routing vs Attribute routing)

  3. What are Tag Helpers in ASP.NET Core MVC?

  4. Explain Filters in ASP.NET Core (Authorization, Resource, Action, Exception, Result).

  5. What is Model Binding in ASP.NET Core?

  6. What are Razor Pages and how do they differ from MVC?

  7. Explain Middleware pipeline ordering and its importance.

  8. How do you enable CORS in ASP.NET Core?

  9. What is logging in ASP.NET Core? Which providers are available by default?

  10. How does ASP.NET Core handle static files?

Advanced ASP.NET Core Interview Questions

  1. Explain the difference between IHostedService and BackgroundService.

  2. What is Health Checks in ASP.NET Core and how do you implement it?

  3. What are gRPC services and how do they differ from REST in ASP.NET Core?

  4. How does authentication and authorization work in ASP.NET Core? (JWT, Cookies, Identity)

  5. How do you secure secrets in ASP.NET Core applications?

  6. What is SignalR and how does it work in ASP.NET Core?

  7. What are minimal APIs introduced in ASP.NET Core 6?

  8. How does middleware differ from filters in ASP.NET Core?

  9. What is the difference between IFormFile and FileStream in file uploads?

  10. How can you implement global exception handling in ASP.NET Core?

Performance & Deployment Questions

  1. What are the ways to improve performance in ASP.NET Core applications?

  2. What is Response Caching and Distributed Caching in ASP.NET Core?

  3. Explain Data Protection API in ASP.NET Core.

  4. How do you host ASP.NET Core applications in Linux and Docker?

  5. What is the difference between in-process and out-of-process hosting in ASP.NET Core?

  6. How do you deploy ASP.NET Core apps to Azure App Service?

  7. What is the role of app.UseEndpoints vs app.UseRouting?

  8. How do you enable HTTPS redirection and HSTS in ASP.NET Core?

  9. What are Environment variables in ASP.NET Core (Development, Staging, Production)?

  10. Explain connection pooling in ASP.NET Core with EF Core.

  1. What is the difference between IActionResult and ActionResult<T> in ASP.NET Core?

  2. How do you configure custom middleware in ASP.NET Core?

  3. What is endpoint routing in ASP.NET Core?

  4. How do you version APIs in ASP.NET Core?

  5. What are strongly-typed configurations and how do you bind them from appsettings.json?

  6. How do you handle localization and globalization in ASP.NET Core?

  7. Explain the difference between ViewData, ViewBag, and TempData.

  8. What are Areas in ASP.NET Core MVC and when would you use them?

  9. How do you create custom model binders in ASP.NET Core?

  10. What is the difference between synchronous and asynchronous action methods?

  11. How do you validate models in ASP.NET Core (Data Annotations vs Fluent Validation)?

  12. What are Environment Tag Helpers?

  13. How do you configure multiple environments in ASP.NET Core?

  14. Explain the concept of request pipeline in ASP.NET Core.

  15. What are the differences between .NET Core, .NET 5/6/7, and .NET Framework for ASP.NET applications?

  16. How do you handle file uploads and downloads in ASP.NET Core?

  17. What is the difference between AddControllers, AddControllersWithViews, and AddRazorPages?

  18. What are conventions in ASP.NET Core MVC?

  19. How do you use Partial Views and View Components?

  20. What is the purpose of IWebHostEnvironment and how is it different from IHostingEnvironment?

  21. How do you configure HTTPS certificates in ASP.NET Core Kestrel server?

  22. What are anti-forgery tokens and how do you implement CSRF protection in ASP.NET Core?

  23. How do you implement custom authorization policies?

  24. What is output caching in ASP.NET Core 7?

  25. How do you implement gRPC streaming in ASP.NET Core?

  26. What is the difference between Blazor Server and Blazor WebAssembly?

  27. How does ASP.NET Core handle dependency injection for logging (ILogger<T>) compared to manual logger creation?

  28. How do you register and use custom IHostedService?

  29. What are filters vs middleware — when to use one over the other?

  30. How do you configure rate limiting and throttling in ASP.NET Core 7?

  31. How do you configure request buffering in ASP.NET Core?

  32. What is the difference between Use, Run, and Map middleware methods?

  33. How do you handle long-running tasks in ASP.NET Core without blocking requests?

  34. How do you configure cookie policies in ASP.NET Core?

  35. How do you implement JWT token refresh in ASP.NET Core?

No comments:

Post a Comment