Skip to main content

.NET Core Interview Cheat Sheet

Top 50 interview questions with concise answers. Print this page or save as PDF for offline study.

View All .NET Core Questions

1. What is inheritance?

2. What is ASP.NET Core and why was it created?

3. Explain the ASP.NET Core hosting model (Host Builder + Kestrel + Startup flow).

4. What is Kestrel and why does ASP.NET Core use it?

5. Explain Middleware and the purpose of the ASP.NET Core Request Pipeline.

6. Why does the order of middleware matter so much?

7. What is Dependency Injection in ASP.NET Core and why is it built-in?

8. Explain the three DI lifetimes (Transient, Scoped, Singleton).

9. What is Configuration in ASP.NET Core and how does it work?

10. What is the purpose of IOptions, IOptionsSnapshot, and IOptionsMonitor?

11. What is Routing in ASP.NET Core?

12. Compare Conventional Routing vs Attribute Routing.

13. What is Model Binding?

14. What is Model Validation and how does it work?

15. What are Filters and why are they important?

16. What are Razor Views?

17. Explain Layouts, Partial Views, and View Components.

18. What are Tag Helpers?

19. What is TempData and how is it different from ViewData/ViewBag?

20. What is Anti-Forgery and why is it required?

21. How does ASP.NET Core handle static files and why is the middleware special?

22. What is the difference between the Generic Host and Web Host in ASP.NET Core?

23. Explain the Application Lifetime events in ASP.NET Core (IHostApplicationLifetime).

24. What is the purpose of the Web Root and why is it separated from the Content Root?

25. Explain the difference between Use, Run, and Map in middleware configuration.

26. What is Environment-based configuration and why is it essential?

27. What are Secrets in ASP.NET Core, and how are they different from configuration files?

28. Explain the Options Pattern and why it’s preferred over directly reading from configuration.

29. What is Razor View Compilation and why does it matter?

30. What is the View Engine and how does Razor differ from classic engines?

31. What are Tag Helper Scopes and how do they improve structure?

32. What is ViewData, ViewBag, and TempData?

33. Explain Endpoint Routing in detail.

34. What is Model Binding Value Providers?

35. Explain Custom Model Binding and when it is required.

36. What is ModelState and why is it crucial?

37. What are Filters and what are their use cases?

38. What is an Exception Filter vs Middleware Exception Handling?

39. Explain ViewComponents and how they differ from Partial Views.

40. What is the Anti-Forgery System in ASP.NET Core?

41. Explain how Static Files Middleware works and why it must be placed early.

42. What is the Application Model in MVC and why do enterprise apps customize it?

43. Explain View Components and why they are better than Partial Views.

44. What is Feature Slicing and why is it replacing Layered Architecture in ASP.NET Core?

45. How does ASP.NET Core prevent request body overconsumption?

46. What is Razor Class Library (RCL) and why do large companies use it?

47. Explain how the Model Validation Pipeline works.

48. What are Filters in MVC and how are the filter types ordered?

49. What is the difference between Authentication and Authorization in ASP.NET Core?

50. What is Razor Layout Hierarchy and how does nested view rendering work?

Ready to level up? Start Practice