Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 1–25 of 29

Popular tracks

Junior PDF
What is a filter in ASP.NET Core?

Short answer: A filter is a component that allows logic to be executed before or after parts of the request pipeline, such as authorization, action execution, or result processing. Real-world example (ShopNest) A ShopNes…

ASP.NET Core Read answer
Junior PDF
Introduction to Filters?

Short answer: Filters are ASP.NET Core’s plug-in points that allow you to inject logic before or after specific pipeline stages such as: Authorization Resource execution Action execution Results processing Exception hand…

ASP.NET Core Read answer
Junior PDF
What is middleware in ASP.NET Core?

Short answer: Middleware is a component in the HTTP request pipeline that can: Handle requests, Pass requests to the next middleware, Or short-circuit the pipeline. Middleware can: Perform actions before and/or after the…

ASP.NET Core Read answer
Junior PDF
What is the difference between Action Filter and Result Filter?

Short answer: Action filters wrap the action method; result filters wrap the returned result (like ObjectResult or ViewResult). Example code Action filters wrap the action method; result filters wrap the returned result…

ASP.NET Core Read answer
Junior PDF
What is RequestDelegate?

Short answer: RequestDelegate is a delegate representing the next middleware in the pipeline: public delegate Task RequestDelegate(HttpContext context); In custom middleware, it allows passing control to the next compone…

ASP.NET Core Read answer
Junior PDF
What is filter order?

Short answer: The sequence in which filters run. Lower Order value = earlier execution. Real-world example (ShopNest) A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same ru…

ASP.NET Core Read answer
Junior PDF
What is Dependency Injection and why is it used?

Short answer: Dependency Injection (DI) is a design pattern that allows you to inject dependencies (services) into classes instead of hard-coding them. Real-world example (ShopNest) ShopNest registers AppDbContext as Sco…

ASP.NET Core Read answer
Junior PDF
What is the purpose of IFilterFactory?

Short answer: Used for filters that require custom instantiation logic. Real-world example (ShopNest) A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every con…

ASP.NET Core Read answer
Junior PDF
What is MVC in ASP.NET Core?

Short answer: MVC (Model-View-Controller) is a pattern for organizing code into: Model: Data and business logic View: UI rendering Controller: Input handling and app flow Built on a modular, cross-platform framework. Use…

ASP.NET Core Read answer
Junior PDF
What is MVC in ASP.NET Core?

Short answer: How does it differ from MVC in “older” ASP.NET? MVC (Model-View-Controller) is a pattern for organizing code into: Model: Data and business logic View: UI rendering Controller: Input handling and app flow B…

ASP.NET Core Read answer
Junior PDF
What is Razor Pages?

Short answer: SP.NET Core 2.0. Each .cshtml file has an associated PageModel class (like a view + controller combined). Best for simple UI-focused apps or CRUD pages. ✅ Use Razor Pages for: Simpler, page-focused apps ✅ U…

ASP.NET Core Read answer
Junior PDF
What is Razor Pages?

Short answer: When to use Razor Pages instead of MVC? Razor Pages is a page-based programming model introduced in ASP.NET Core 2.0. Each .cshtml file has an associated PageModel class (like a view + controller combined).…

ASP.NET Core Read answer
Junior PDF
What is REST?

Short answer: REST (Representational State Transfer) is an architectural style for building scalable web services. RESTful APIs follow standard HTTP methods (GET, POST, PUT, DELETE) and stateless communication. Real-worl…

ASP.NET Core Read answer
Junior PDF
What is the [ApiController] attribute and what benefits it brings?

Short answer: SP.NET Core. ✅ Benefits: Automatic model validation Infer [FromBody] / [FromQuery], etc. 400 BadRequest returned automatically if model state is invalid. Improved parameter binding behavior Real-world examp…

ASP.NET Core Read answer
Junior PDF
What is the [ApiController] attribute and what benefits it brings?

Short answer: The [ApiController] attribute is used to denote Web API controllers in ASP.NET Core. ✅ Benefits: Automatic model validation Infer [FromBody] / [FromQuery], etc. 400 BadRequest returned automatically if mode…

ASP.NET Core Read answer
Junior PDF
What is authentication vs authorization?

Short answer: ction (What are you allowed to do?) In ASP.NET Core, both are handled via middleware and attributes like [Authorize], roles, nd policies. Real-world example (ShopNest) A ShopNest checkout request flows thro…

ASP.NET Core Read answer
Junior PDF
What is authentication vs authorization?

Short answer: Authentication: Verifying the identity of a user (Who are you?) Authorization: Determining if the authenticated user has permission to perform an action (What are you allowed to do?) In ASP.NET Core, both a…

ASP.NET Core Read answer
Junior PDF
Custom authorization policies and handlers Define complex authorization rules using IAuthorizationHandler: public class MinimumAgeRequirement : IAuthorizationRequirement { public int Age { get; } public MinimumAgeRequirement(int age) => Age = age; } public class MinimumAgeHandler :

Short answer: uthorizationHandler<MinimumAgeRequirement> { protected override Task HandleRequirementAsync(...) { // logic } } Register in DI and use with [Authorize(Policy = "...")]. Real-world example (S…

ASP.NET Core Read answer
Junior PDF
What is the order of filters?

Short answer: Filters run in a specific order depending on their type: Authorization filters run first. Explain a bit more Resource filters run next. Model binding happens after resource filters. Action filters run aroun…

ASP.NET Core Read answer
Junior PDF
What is filter context and what can filters do?

Short answer: Filters receive context objects (e.g., ActionExecutingContext) providing: HTTP context and request data. Access to action parameters. Ability to modify or cancel execution (e.g., short-circuit). Access to t…

ASP.NET Core Read answer
Junior PDF
What is short-circuiting in filters?

Short answer: Filters can short-circuit by setting the result early, preventing further execution: public void OnActionExecuting(ActionExecutingContext context) Example code { if (!IsAuthorized()) { context.Result = new…

ASP.NET Core Read answer
Junior PDF
CORS: What is it?

Short answer: CORS (Cross-Origin Resource Sharing) is a browser security feature that restricts web pages from making requests to a different domain than the one that served the web page, to prevent cross-site attacks. C…

ASP.NET Core Read answer
Junior PDF
What is the difference between IActionResult and ActionResult<T>?

Short answer: IActionResult: Represents a non-generic result of an action method. Can return any HTTP response (Ok, NotFound, Redirect, etc.). ActionResult&lt;T&gt;: Combines a result with a typed value (T). It allows re…

ASP.NET Core Read answer
Junior PDF
What is the role of Startup class now with newer versions of .NET vs minimal hosting model?

Short answer: In .NET 5 and earlier, Startup configures services and middleware. In .NET 6+ minimal hosting model, the Program.cs file combines service registration and middleware setup with a simplified, top-level state…

ASP.NET Core Read answer
Junior PDF
What is minimal API and how is it different from controllers?

Short answer: Minimal APIs are lightweight endpoints defined with top-level statements, no controller classes. Ideal for microservices or simple APIs. Less ceremony and fewer files. Controllers provide richer features (f…

ASP.NET Core Read answer

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: A filter is a component that allows logic to be executed before or after parts of the request pipeline, such as authorization, action execution, or result processing.

Real-world example (ShopNest)

A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Filters are ASP.NET Core’s plug-in points that allow you to inject logic before or after specific pipeline stages such as: Authorization Resource execution Action execution Results processing Exception handling They help you implement cross-cutting concerns without cluttering controllers or actions.

Explain a bit more

In enterprise systems, filters are indispensable for: Logging Validation Authorization Error handling Performance profiling Policy enforcement

Real-world example (ShopNest)

A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Middleware is a component in the HTTP request pipeline that can: Handle requests, Pass requests to the next middleware, Or short-circuit the pipeline. Middleware can: Perform actions before and/or after the next middleware executes. Be used for logging, authentication, error handling, etc. Middleware executes in the order it's added in Program.cs.

Real-world example (ShopNest)

ShopNest pipeline order matters: exception handling → HTTPS → auth → authorization → endpoints. Auth must run before protected APIs.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Action filters wrap the action method; result filters wrap the returned result (like ObjectResult or ViewResult).

Example code

Action filters wrap the action method; result filters wrap the returned result (like ObjectResult or ViewResult).

Real-world example (ShopNest)

ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putting DbContext in a Singleton causes threading bugs.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: RequestDelegate is a delegate representing the next middleware in the pipeline: public delegate Task RequestDelegate(HttpContext context); In custom middleware, it allows passing control to the next component.

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: The sequence in which filters run. Lower Order value = earlier execution.

Real-world example (ShopNest)

A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Dependency Injection (DI) is a design pattern that allows you to inject dependencies (services) into classes instead of hard-coding them.

Real-world example (ShopNest)

ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putting DbContext in a Singleton causes threading bugs.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Used for filters that require custom instantiation logic.

Real-world example (ShopNest)

A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: MVC (Model-View-Controller) is a pattern for organizing code into: Model: Data and business logic View: UI rendering Controller: Input handling and app flow Built on a modular, cross-platform framework. Uses dependency injection by default. Unified Web API + MVC pipeline. Lightweight and middleware-based request processing.

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: How does it differ from MVC in “older” ASP.NET? MVC (Model-View-Controller) is a pattern for organizing code into: Model: Data and business logic View: UI rendering Controller: Input handling and app flow Built on a modular, cross-platform framework. Uses dependency injection by default. Unified Web API + MVC pipeline. Lightweight and middleware-based request processing.

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: SP.NET Core 2.0. Each .cshtml file has an associated PageModel class (like a view + controller combined). Best for simple UI-focused apps or CRUD pages. ✅ Use Razor Pages for: Simpler, page-focused apps ✅ Use MVC for: Complex, controller-based routing or large, structured apps

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: When to use Razor Pages instead of MVC? Razor Pages is a page-based programming model introduced in ASP.NET Core 2.0. Each .cshtml file has an associated PageModel class (like a view + controller combined). Best for simple UI-focused apps or CRUD pages. ✅ Use Razor Pages for: Simpler, page-focused apps ✅ Use MVC for: Complex, controller-based routing or large, structured apps

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: REST (Representational State Transfer) is an architectural style for building scalable web services. RESTful APIs follow standard HTTP methods (GET, POST, PUT, DELETE) and stateless communication.

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: SP.NET Core. ✅ Benefits: Automatic model validation Infer [FromBody] / [FromQuery], etc. 400 BadRequest returned automatically if model state is invalid. Improved parameter binding behavior

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: The [ApiController] attribute is used to denote Web API controllers in ASP.NET Core. ✅ Benefits: Automatic model validation Infer [FromBody] / [FromQuery], etc. 400 BadRequest returned automatically if model state is invalid. Improved parameter binding behavior

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: ction (What are you allowed to do?) In ASP.NET Core, both are handled via middleware and attributes like [Authorize], roles, nd policies.

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Authentication: Verifying the identity of a user (Who are you?) Authorization: Determining if the authenticated user has permission to perform an action (What are you allowed to do?) In ASP.NET Core, both are handled via middleware and attributes like [Authorize], roles, and policies.

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: uthorizationHandler<MinimumAgeRequirement> { protected override Task HandleRequirementAsync(...) { // logic } } Register in DI and use with [Authorize(Policy = "...")].

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Filters run in a specific order depending on their type: Authorization filters run first.

Explain a bit more

Resource filters run next. Model binding happens after resource filters. Action filters run around the action execution. Exception filters handle exceptions thrown during action or result execution. Result filters run around result execution. Within each type, filters can be ordered by their Order property and whether they are global, controller-level, or action-level.

Real-world example (ShopNest)

A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Filters receive context objects (e.g., ActionExecutingContext) providing: HTTP context and request data. Access to action parameters. Ability to modify or cancel execution (e.g., short-circuit). Access to the result or exceptions. Ability to set result or modify response. This allows filters to inspect, modify, or block processing at their stage.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Filters can short-circuit by setting the result early, preventing further execution: public void OnActionExecuting(ActionExecutingContext context)

Example code

{
if (!IsAuthorized())
{
context.Result = new UnauthorizedResult(); // stops pipeline here }
} This prevents action execution and later filters from running.

Real-world example (ShopNest)

A ShopNest ValidateModelAttribute runs before actions and returns 400 if ModelState is invalid—same rule for every controller.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: CORS (Cross-Origin Resource Sharing) is a browser security feature that restricts web pages from making requests to a different domain than the one that served the web page, to prevent cross-site attacks. CORS defines a way for servers to allow controlled access to resources from a different origin.

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: IActionResult: Represents a non-generic result of an action method. Can return any HTTP response (Ok, NotFound, Redirect, etc.). ActionResult<T>: Combines a result with a typed value (T). It allows returning typed data or an HTTP response. Improves clarity and enables better OpenAPI docs.

Real-world example (ShopNest)

ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putting DbContext in a Singleton causes threading bugs.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: In .NET 5 and earlier, Startup configures services and middleware. In .NET 6+ minimal hosting model, the Program.cs file combines service registration and middleware setup with a simplified, top-level statement style. Startup can still be used for organization, but not required.

Real-world example (ShopNest)

A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Short answer: Minimal APIs are lightweight endpoints defined with top-level statements, no controller classes. Ideal for microservices or simple APIs. Less ceremony and fewer files. Controllers provide richer features (filters, model binding, action results).

Real-world example (ShopNest)

ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putting DbContext in a Singleton causes threading bugs.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details