Dot net core
Certainly! Here's a list of 100 interview questions covering various aspects of .NET Core:
**.NET Core Basics:**
1. What is .NET Core?
2. Differentiate between .NET Framework and .NET Core.
3. Explain the advantages of using .NET Core.
4. What is cross-platform development, and how does .NET Core support it?
5. Describe the architecture of .NET Core.
6. How does .NET Core handle versioning?
**Project Structure and Configuration:**
7. What are the main components of a .NET Core project?
8. Explain the purpose of the `project.json` file in older versions of .NET Core.
9. Describe the role of the `csproj` file in .NET Core.
10. How do you configure application settings in a .NET Core application?
11. What is `appsettings.json`, and how is it used for configuration?
12. Explain the use of environment-specific configuration in .NET Core.
13. What is the difference between `appsettings.json`, `appsettings.Development.json`, and `appsettings.Production.json`?
14. How do you read configuration values in .NET Core?
**Dependency Injection:**
15. What is dependency injection (DI), and why is it important in .NET Core?
16. Explain the built-in DI container in .NET Core.
17. How do you register and resolve dependencies in .NET Core?
18. Describe the differences between `AddScoped`, `AddTransient`, and `AddSingleton` in DI registration.
19. How can you use custom DI containers in .NET Core?
**Middleware and Request Pipeline:**
20. What is middleware in the context of ASP.NET Core?
21. Explain the request processing pipeline in ASP.NET Core.
22. How do you add middleware components to the pipeline?
23. What is the role of the `Startup.cs` file in ASP.NET Core?
24. Describe the purpose of routing middleware in ASP.NET Core.
25. How can you create custom middleware in ASP.NET Core?
**Controllers and Views:**
26. What are controllers in ASP.NET Core, and how are they different from MVC controllers in .NET Framework?
27. Explain the role of actions in controllers.
28. How do you return different types of responses from actions (e.g., JSON, views)?
29. Describe the structure of a Razor view in ASP.NET Core.
30. What is a view component, and how does it differ from a partial view?
31. How do you pass data from a controller to a view in ASP.NET Core?
**Routing and Attribute Routing:**
32. What is routing, and why is it important in ASP.NET Core?
33. How do you configure routing in ASP.NET Core?
34. Explain attribute routing in ASP.NET Core.
35. How do you define route constraints in ASP.NET Core routing?
36. What is the purpose of route parameters, and how do you access them in actions?
**Model Binding and Validation:**
37. What is model binding in ASP.NET Core?
38. Explain how model binding works for HTTP GET and POST requests.
39. How do you perform custom model binding in ASP.NET Core?
40. Describe model validation in ASP.NET Core.
41. How can you use data annotations for model validation?
42. Explain how to perform client-side validation in ASP.NET Core.
**Authentication and Authorization:**
43. What is authentication, and how is it implemented in ASP.NET Core?
44. Describe the use of ASP.NET Core Identity for user management and authentication.
45. What is token-based authentication, and how is it used in ASP.NET Core?
46. Explain the purpose of authorization in ASP.NET Core.
47. How do you create custom authorization policies in ASP.NET Core?
48. What is role-based authorization, and how is it implemented?
**Entity Framework Core:**
49. What is Entity Framework Core (EF Core), and how does it differ from Entity Framework 6 (EF6)?
50. How do you create a database context in EF Core?
51. Explain database migrations in EF Core.
52. How do you perform CRUD (Create, Read, Update, Delete) operations using EF Core?
53. Describe the use of LINQ with EF Core.
54. What are EF Core migrations, and why are they important?
**Web API Development:**
55. How do you create a RESTful Web API in ASP.NET Core?
56. Explain the purpose of attribute routing in Web API controllers.
57. How do you handle HTTP request and response formats (JSON, XML) in a Web API?
58. What is content negotiation in Web API, and how is it configured?
59. Describe input validation and request validation in Web API.
60. How can you enable CORS (Cross-Origin Resource Sharing) in a Web API?
**Testing in .NET Core:**
61. How do you write unit tests for .NET Core applications?
62. Explain the use of xUnit, MSTest, or NUnit for unit testing in .NET Core.
63. What is dependency injection, and how does it facilitate unit testing?
64. How do you write integration tests for ASP.NET Core applications?
65. Describe the purpose of test host in integration testing.
**Middleware and Authentication Testing:**
66. How can you write tests for custom middleware components in ASP.NET Core?
67. What is the purpose of authentication testing in ASP.NET Core?
68. How do you write tests for authentication and authorization scenarios?
69. Describe the use of identity server for authentication and testing.
**Security in .NET Core:**
70. How do you protect against common security vulnerabilities in .NET Core applications?
71. Explain the purpose of security headers (e.g., Content Security Policy, X-Content-Type-Options) in ASP.NET Core.
72. How do you prevent Cross-Site Request Forgery (CSRF) attacks in ASP.NET Core?
73. What is Cross-Site Scripting (XSS), and how can it be mitigated in ASP.NET Core?
**Exception Handling:**
74. How do you handle exceptions in .NET Core applications?
75. Explain the use of exception filters in ASP.NET Core.
76. What is structured exception handling, and how does it differ from global exception handling?
**Deployment and Hosting:**
77. How do you deploy a .NET Core application to a web server?
78. Explain the use of Docker for containerizing .NET Core applications.
79. How do you deploy .NET Core applications to cloud platforms like Azure or AWS?
80. Describe the process of self-contained deployment in .NET Core.
**Performance Optimization:**
81. What are some performance optimization techniques for .NET Core applications?
82. Explain the benefits of asynchronous programming in .NET Core.
83. How can you profile and diagnose performance issues in .NET Core applications?
84. Describe the use of caching for performance improvement.
**Logging and Monitoring:**
85. How do you implement logging in .NET Core applications?
86. Explain the purpose of log levels (e.g., Information, Warning, Error) in logging.
87. How can you integrate third-party logging frameworks like Serilog or NLog?
88. Describe application monitoring and profiling tools for .NET Core.
**Database and Entity Framework Core:**
89. How do you choose between different database providers (e.g., SQL Server, MySQL, SQLite) in EF Core?
90. Explain the purpose of migrations in EF Core database schema changes.
91. How can you improve database performance in EF Core
Comments
Post a Comment