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 201–225 of 228

Career & HR topics

By tech stack

Mid PDF
Response caching, output caching?

Short answer: Response caching caches HTTP responses based on headers. Output caching (new in ASP.NET Core 7) caches entire output of endpoints. Real-world example (ShopNest) A ShopNest checkout request flows through mid…

ASP.NET Core Read answer
Mid PDF
SignalR (real-time communication)?

Short answer: Enables real-time bi-directional communication. Supports WebSockets, Server-Sent Events, long polling. Real-world example (ShopNest) A ShopNest checkout request flows through middleware, hits a minimal API…

ASP.NET Core Read answer
Mid PDF
Background tasks / hosted services?

Short answer: Use IHostedService or BackgroundService to run background tasks. Useful for timers, queue processing. Real-world example (ShopNest) A ShopNest checkout request flows through middleware, hits a minimal API o…

ASP.NET Core Read answer
Mid PDF
Working with files and streaming?

Short answer: Stream large files efficiently using FileStreamResult. Use async IO to avoid blocking. Real-world example (ShopNest) A ShopNest checkout request flows through middleware, hits a minimal API or controller, u…

ASP.NET Core Read answer
Mid PDF
Version of .NET Core / .NET changes (what’s new in latest)?

Short answer: Track latest improvements like minimal APIs, source generators, performance boosts. Keep updated with latest SDKs. Scenario / Design & Best Practices Say this in the interview Define — one clear sentenc…

ASP.NET Core Read answer
Mid PDF
How to structure a large ASP.NET Core solution (layers, clean

Short answer: architecture, onion architecture) Use layered architecture: Presentation (API/UI), Application (services, business logic), Domain (entities, business rules), Infrastructure (data access, external services).…

ASP.NET Core Read answer
Mid PDF
Handling resource cleanup (e.g. DbContext disposal)?

Short answer: Use DI to manage lifecycle of DbContext as Scoped. Avoid manual disposal; rely on DI container. Dispose IDisposable objects promptly when created manually. Use using statements for short-lived resources. Re…

ASP.NET Core Read answer
Mid PDF
Design for testability (unit tests, integration tests)?

Short answer: Write loosely coupled code via DI. Mock external dependencies for unit tests. Use in-memory databases (e.g., InMemory EF Core) for integration tests. Isolate layers to enable focused testing. Say this in th…

ASP.NET Core Read answer
Mid PDF
Logging vs tracing vs exception reporting?

Short answer: Logging: recording app events/info. Tracing: tracking execution flow across components or services. Exception reporting: capturing and notifying on errors. Use structured logging and distributed tracing for…

ASP.NET Core Read answer
Mid PDF
Data access: EF Core best practices (no tracking, lazy loading,?

Short answer: migrations) Use No Tracking queries for read-only data to improve performance. Use lazy loading cautiously; prefer explicit loading to avoid surprises. Manage migrations with proper version control. Use asy…

ASP.NET Core Read answer
Mid PDF
Handling database migrations in production safely?

Short answer: Apply migrations in CI/CD pipeline with proper backups. Use transactional migrations where supported. Run migrations during maintenance windows. Test migrations in staging before production. Real-world exam…

ASP.NET Core Read answer
Mid PDF
Versioning and backward compatibility of APIs?

Short answer: Maintain multiple API versions with clear deprecation policies. Avoid breaking changes; use additive changes. Communicate version lifecycle clearly to consumers. Real-world example (ShopNest) A ShopNest che…

ASP.NET Core Read answer
Mid PDF
Rate limiting / throttling strategies?

Short answer: Protect APIs from abuse using rate limits (requests per second/minute). Use libraries like AspNetCoreRateLimit or API Gateway features. Implement IP-based or user-based throttling. Real-world example (ShopN…

ASP.NET Core Read answer
Mid PDF
Error / exception handling patterns?

Short answer: Use global exception handling middleware. Return meaningful HTTP status codes and error details. Avoid leaking sensitive info. Implement retry policies for transient errors. Real-world example (ShopNest) A…

ASP.NET Core Read answer
Mid PDF
Graceful shutdown?

Short answer: Handle shutdown signals to complete ongoing requests. Dispose resources correctly. Use IHostApplicationLifetime events to hook into shutdown process. Real-world example (ShopNest) A ShopNest checkout reques…

ASP.NET Core Read answer
Mid PDF
Handling secrets securely?

Short answer: Use Azure Key Vault, AWS Secrets Manager, or HashiCorp Vault. Avoid storing secrets in code or config files. Use environment variables or user secrets during development. Real-world example (ShopNest) A Sho…

ASP.NET Core Read answer
Mid PDF
Use of configuration and environment variables in CI/CD?

Short answer: Inject config via environment variables or secret stores in pipelines. Use multiple config files per environment (appsettings.Development.json). Secure sensitive values using CI/CD secret management. Real-w…

ASP.NET Core Read answer
Mid PDF
Internationalization / localization?

Short answer: Use resource files (.resx) for strings. Configure RequestLocalizationMiddleware. Support multiple cultures and fallback cultures. Localize data formats, dates, currencies. Real-world example (ShopNest) A Sh…

ASP.NET Core Read answer
Mid PDF
Validation of inputs to avoid security vulnerabilities (e.g. SQL?

Short answer: injection, XSS etc) Use parameterized queries / ORM to prevent SQL injection. Sanitize and encode user input to prevent XSS. Validate inputs rigorously on server side. Use built-in validation attributes and…

ASP.NET Core Read answer
Mid PDF
How to migrate an ASP.NET Core application from .NET 5 to .NET 8 (or newer)?

Short answer: Update target framework in project file (net8.0). Update NuGet packages and dependencies. Adapt code for minimal APIs if desired. Replace Startup with minimal hosting model if preferred. Test thoroughly for…

ASP.NET Core Read answer
Mid PDF
How do you handle version conflicts (e.g., multiple dependencies needing different versions of a library)?

Short answer: Use binding redirects (in .NET Framework). Use assembly version unification and strong-named assemblies. In .NET Core, resolve via NuGet package management, use central package versions. Consider upgrading…

ASP.NET Core Read answer
Mid PDF
Difference between conventional routing and attribute routing?

Short answer: Conventional routing: Routes defined centrally (usually in Startup), patterns applied globally. Attribute routing: Routes declared directly on controllers/actions via attributes ([Route], [HttpGet]). Attrib…

ASP.NET Core Read answer
Mid PDF
How to enable OpenAPI / Swagger UI and customizing it

Short answer: Add Swashbuckle.AspNetCore NuGet package. Configure Swagger services (builder.Services.AddSwaggerGen()). Enable middleware (app.UseSwagger(), app.UseSwaggerUI()). Customize with options like API info, docum…

ASP.NET Core Read answer
Mid PDF
How to return custom error responses / use custom middleware for

Short answer: error responses Implement custom exception handling middleware. Catch exceptions, set HTTP status, and return custom JSON payload. Use UseExceptionHandler() or global filters. Customize ProblemDetails or yo…

ASP.NET Core Read answer
Mid PDF
Using cancellation tokens in API controllers or actions?

Short answer: Accept CancellationToken parameter in action methods. Pass token to async calls to support request cancellation. Improves responsiveness and resource management. Real-world example (ShopNest) A ShopNest che…

ASP.NET Core Read answer

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

Short answer: Response caching caches HTTP responses based on headers. Output caching (new in ASP.NET Core 7) caches entire output of endpoints.

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: Enables real-time bi-directional communication. Supports WebSockets, Server-Sent Events, long polling.

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: Use IHostedService or BackgroundService to run background tasks. Useful for timers, queue 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: Stream large files efficiently using FileStreamResult. Use async IO to avoid blocking.

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: Track latest improvements like minimal APIs, source generators, performance boosts. Keep updated with latest SDKs. Scenario / Design & Best Practices

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: architecture, onion architecture) Use layered architecture: Presentation (API/UI), Application (services, business logic), Domain (entities, business rules), Infrastructure (data access, external services).

Explain a bit more

Clean Architecture emphasizes separation of concerns and dependency direction towards the domain layer. Onion Architecture structures the app around the core domain, with dependencies pointing inward. Use projects to separate concerns and improve maintainability.

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: Use DI to manage lifecycle of DbContext as Scoped. Avoid manual disposal; rely on DI container. Dispose IDisposable objects promptly when created manually. Use using statements for short-lived resources.

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: Write loosely coupled code via DI. Mock external dependencies for unit tests. Use in-memory databases (e.g., InMemory EF Core) for integration tests. Isolate layers to enable focused testing.

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: Logging: recording app events/info. Tracing: tracking execution flow across components or services. Exception reporting: capturing and notifying on errors. Use structured logging and distributed tracing for diagnostics.

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: migrations) Use No Tracking queries for read-only data to improve performance. Use lazy loading cautiously; prefer explicit loading to avoid surprises. Manage migrations with proper version control. Use async queries to avoid blocking.

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: Apply migrations in CI/CD pipeline with proper backups. Use transactional migrations where supported. Run migrations during maintenance windows. Test migrations in staging before production.

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: Maintain multiple API versions with clear deprecation policies. Avoid breaking changes; use additive changes. Communicate version lifecycle clearly to consumers.

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: Protect APIs from abuse using rate limits (requests per second/minute). Use libraries like AspNetCoreRateLimit or API Gateway features. Implement IP-based or user-based throttling.

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: Use global exception handling middleware. Return meaningful HTTP status codes and error details. Avoid leaking sensitive info. Implement retry policies for transient errors.

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: Handle shutdown signals to complete ongoing requests. Dispose resources correctly. Use IHostApplicationLifetime events to hook into shutdown process.

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: Use Azure Key Vault, AWS Secrets Manager, or HashiCorp Vault. Avoid storing secrets in code or config files. Use environment variables or user secrets during development.

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: Inject config via environment variables or secret stores in pipelines. Use multiple config files per environment (appsettings.Development.json). Secure sensitive values using CI/CD secret management.

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: Use resource files (.resx) for strings. Configure RequestLocalizationMiddleware. Support multiple cultures and fallback cultures. Localize data formats, dates, currencies.

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: injection, XSS etc) Use parameterized queries / ORM to prevent SQL injection. Sanitize and encode user input to prevent XSS. Validate inputs rigorously on server side. Use built-in validation attributes and custom validators. Sample / Misc Interview Questions

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: Update target framework in project file (net8.0). Update NuGet packages and dependencies. Adapt code for minimal APIs if desired. Replace Startup with minimal hosting model if preferred. Test thoroughly for API changes or obsoleted APIs. Review and update middleware and routing patterns.

Example code

Update target framework in project file (net8.0). Update NuGet packages and dependencies. Adapt code for minimal APIs if desired. Replace Startup with minimal hosting model if preferred. Test thoroughly for API changes or obsoleted APIs. Review and update middleware and routing patterns.

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: Use binding redirects (in .NET Framework). Use assembly version unification and strong-named assemblies. In .NET Core, resolve via NuGet package management, use central package versions. Consider upgrading or consolidating dependencies.

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: Conventional routing: Routes defined centrally (usually in Startup), patterns applied globally. Attribute routing: Routes declared directly on controllers/actions via attributes ([Route], [HttpGet]). Attribute routing is more flexible and explicit.

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: Add Swashbuckle.AspNetCore NuGet package. Configure Swagger services (builder.Services.AddSwaggerGen()). Enable middleware (app.UseSwagger(), app.UseSwaggerUI()). Customize with options like API info, document filters, UI themes.

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: error responses Implement custom exception handling middleware. Catch exceptions, set HTTP status, and return custom JSON payload. Use UseExceptionHandler() or global filters. Customize ProblemDetails or your own error models.

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: Accept CancellationToken parameter in action methods. Pass token to async calls to support request cancellation. Improves responsiveness and resource management.

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
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