Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
Short answer: Introduced in ASP.NET Core 3.0. Centralized routing system that decouples route matching from middleware. Routes requests to endpoints defined by controllers, Razor Pages, minimal APIs. Supports route-based…
Short answer: pplied globally. Attribute routing: Routes declared directly on controllers/actions via attributes ([Route], [HttpGet]). Attribute routing is more flexible and explicit. Real-world example (ShopNest) ShopNe…
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…
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…
Short answer: types Automatically selects response format (JSON, XML) based on Accept header. Configured via formatters in MVC options. Falls back to default formatter if no match. Real-world example (ShopNest) ShopNest…
Short answer: Standardized error response format defined by RFC 7807. Contains properties like status, title, detail, instance. Used by default in ASP.NET Core for error responses. Real-world example (ShopNest) A ShopNes…
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…
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…
Short answer: configure them Default max request body size is 30 MB. Configure via RequestSizeLimit attribute or KestrelServerOptions.Limits.MaxRequestBodySize. For IIS, adjust maxAllowedContentLength. Real-world example…
Short answer: Add ResponseCompression middleware. Register compression providers (AddResponseCompression()) in Program.cs. Configure supported MIME types and compression level. Real-world example (ShopNest) A ShopNest ch…
Short answer: System.Text.Json: Default in .NET Core 3+, fast, built-in, less feature-rich. Newtonsoft.Json: More mature, supports advanced scenarios (e.g., polymorphic deserialization). Can switch to Newtonsoft by addin…
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Introduced in ASP.NET Core 3.0. Centralized routing system that decouples route matching from middleware. Routes requests to endpoints defined by controllers, Razor Pages, minimal APIs. Supports route-based middleware filters.
Introduced in ASP.NET Core 3.0. Centralized routing system that decouples route matching from middleware. Routes requests to endpoints defined by controllers, Razor Pages, minimal APIs. Supports route-based middleware filters.
A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: pplied globally. Attribute routing: Routes declared directly on controllers/actions via attributes ([Route], [HttpGet]). Attribute routing is more flexible and explicit.
ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putting DbContext in a Singleton causes threading bugs.
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.
ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putting DbContext in a Singleton causes threading bugs.
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.
A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: types Automatically selects response format (JSON, XML) based on Accept header. Configured via formatters in MVC options. Falls back to default formatter if no match.
ShopNest registers AppDbContext as Scoped and IMemoryCache as Singleton. Putting DbContext in a Singleton causes threading bugs.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Standardized error response format defined by RFC 7807. Contains properties like status, title, detail, instance. Used by default in ASP.NET Core for error responses.
A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.
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.
ShopNest pipeline order matters: exception handling → HTTPS → auth → authorization → endpoints. Auth must run before protected APIs.
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.
A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: configure them Default max request body size is 30 MB. Configure via RequestSizeLimit attribute or KestrelServerOptions.Limits.MaxRequestBodySize. For IIS, adjust maxAllowedContentLength.
A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: Add ResponseCompression middleware. Register compression providers (AddResponseCompression()) in Program.cs. Configure supported MIME types and compression level.
A ShopNest checkout request flows through middleware, hits a minimal API or controller, uses scoped services, and returns ProblemDetails on errors.
ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core
Short answer: System.Text.Json: Default in .NET Core 3+, fast, built-in, less feature-rich. Newtonsoft.Json: More mature, supports advanced scenarios (e.g., polymorphic deserialization). Can switch to Newtonsoft by adding AddNewtonsoftJson() in MVC options.
Install Toolliyo like an app Free
Home-screen access to tutorials, coding practice & career tools — no app store needed.
On iPhone/iPad: tap Share then Add to Home Screen.