Describe the role of the Startup class in ASP.NET Core.
Junior
Explain the concept of middleware in ASP.NET Core. Can you provide an example of how to create custom middleware?
Junior
Explain the concept of Tag Helpers in ASP.NET Core.
Junior
Explain the difference between ASP.NET Core and ASP.NET Framework.
Junior
Explain the request processing pipeline in ASP.NET Core.
Junior
How do you handle configuration in ASP.NET Core?
Junior
What are the benefits of ASP.NET Core?
Junior
What is ASP.NET Core?
Junior
What is Dependency Injection, and how is it implemented in ASP.NET Core?
Junior
What is Entity Framework Core, and how is it different from Entity Framework?
Junior
What is NuGet package manager?
Junior
What is Razor Pages in ASP.NET Core?
Junior
What is routing in ASP.NET Core? How can you define routes?
Junior
What is the purpose of the Program class?
Junior
What is the purpose of the wwwroot folder?
Junior
What is an Action Method in ASP.NET Core MVC?
Mid
Differentiate between app.Run and app.Use in middleware configuration.
Mid
Explain Session and State Management options in ASP.NET Core.
Mid
Explain the concept of Health Checks in ASP.NET Core. How are they implemented, and why are they important?
Mid
Explain the concept of middleware pipeline termination in ASP.NET Core. How can you terminate the pipeline and short-circuit further processing?
Mid
Explain the concept of model binding in ASP.NET Core. How does it work, and how can you customize it?
Mid
Explain the concept of View Components in ASP.NET Core. How are they different from partial views?
Mid
Explain the differences between Inversion of Control (IoC) and Dependency Injection (DI).
Mid
Explain the MVC (Model-View-Controller) pattern.
Mid
Explain the purpose of the [ApiController] attribute in ASP.NET Core controllers. How does it affect the behavior of a controller and its actions?
Mid
Explain the purpose of the app.UseDeveloperExceptionPage middleware in ASP.NET Core.
Mid
Explain the purpose of the app.UseMvc method in ASP.NET Core, and how is it used to configure the MVC framework in the middleware pipeline?
Mid
Explain the purpose of the ConfigureServices method in the Startup class. How is it used to configure services in an ASP.NET Core application?
Mid
Explain the purpose of the FromServices attribute in ASP.NET Core.
Mid
Explain the purpose of the ITempDataDictionary in ASP.NET Core.
Mid
Explain the role of the DbContext in Entity Framework Core. How does it relate to database interactions in an ASP.NET Core application?
Mid
Explain the role of the IActionFilter and IAuthorizationFilter interfaces in ASP.NET Core.
Mid
Explain the role of the IActionResult interface in ASP.NET Core. Provide examples of different types of action results.
Mid
Explain the role of the UseStaticFiles middleware in ASP.NET Core.
Mid
How can you handle cross-origin resource sharing (CORS) in an ASP.NET Core application?
Mid
How can you handle exceptions globally in an ASP.NET Core application?
Mid
How does ASP.NET Core handle authentication and authorization?
Mid
How does ASP.NET Core handle state management? Explain the differences between TempData, ViewData, and ViewBag.
Mid
How does ASP.NET Core support cross-site request forgery (CSRF) protection, and what mechanisms can be used to prevent CSRF attacks?
Mid
How does ASP.NET Core support data validation, and what are the validation attributes available in the framework?
Mid
How does ASP.NET Core support logging, and what are the different log levels available?
Mid
What are the benefits of using ASP.NET Core for microservices architecture?
Mid
What are the different service lifetimes in ASP.NET Core?
Mid
What are the roles of Model, View, and Controller in ASP.NET Core MVC?
Mid
What is a Request delegate in ASP.NET Core?
Mid
What is Model Binding in ASP.NET Core?
Mid
What is the purpose of the [Produces] attribute in ASP.NET Core controllers? How can it be used to specify the content types a controller action can produce?
Mid
What is the purpose of the AllowAnonymous attribute in ASP.NET Core, and when would you use it in your controllers or action methods?
Mid
What is the purpose of the app.Map and app.MapWhen methods in ASP.NET Core, and how are they used?
Mid
What is the purpose of the app.UseCors middleware in ASP.NET Core?
Mid
What is the purpose of the app.UseExceptionHandler method in ASP.NET Core, and how can it be used to handle errors in the application?
Mid
What is the purpose of the app.UseHttpsRedirection middleware, and how can it be configured to enforce HTTPS in an ASP.NET Core application?
Mid
What is the purpose of the appsettings.Development.json and appsettings.Production.json files in an ASP.NET Core application?
Mid
What is the purpose of the appsettings.json file in an ASP.NET Core application?
Mid
What is the purpose of the async and await keywords in C#? How are they used in ASP.NET Core?
Mid
What is the purpose of the IHostedService interface in ASP.NET Core, and how can it be used?
Mid
What is the purpose of the ModelState object in ASP.NET Core, and how is it used for validation?
Mid
What is the purpose of the ModelState.AddModelError method in ASP.NET Core?
Mid
What is the role of the app.UseEndpoints method in the Startup class?
Mid
Explain the differences between services.AddSingleton, services.AddScoped, and services.AddTransient in ASP.NET Core dependency injection. When would you use each?
Senior
Explain the purpose of the IWebHostEnvironment interface in ASP.NET Core?
Senior
Explain the purpose of the ModelState.IsValid property in ASP.NET Core. How is it used in form validation?
Senior
Explain the role of the app.UseForwardedHeaders middleware in ASP.NET Core.
Senior
Explain the role of the app.UseHsts middleware in ASP.NET Core, and how can it enhance the security of a web application?
Senior
How does ASP.NET Core support cross-site scripting (XSS) protection, and what measures can be taken to prevent XSS attacks in an application?
Senior
How does ASP.NET Core support versioning for APIs?
Senior
What is the purpose of the ITagHelper interface in ASP.NET Core, and how can it be used to extend HTML functionality in Razor views?
Senior
What is the role of the UseSwagger and UseSwaggerUI methods in ASP.NET Core, and how can they be used to document and test APIs?
Senior
Top 55 ASP.NET Core Interview Questions And Answers 2025 | TechPrep