Loading...
Loading...
Browse 4 real-world technical and behavioral interview questions about Aspnet core. Review scenarios, edge cases, and architectural best practices.
Detached ASP.NET Core background work can fail after the response because the request scope is disposed. Copy required values, create a fresh service scope, and run tracked work through IHostedService, BackgroundService or a durable queue.
A CancellationToken in C# is cooperative cancellation, not a thread abort. Pass it through async calls, check it around long CPU loops, and define whether cancelled work leaves durable side effects behind.
The pipeline is an ordered list you assembled, and authorisation cannot decide anything before routing has selected an endpoint to decide about. Registered in the wrong order it either runs against nothing or never runs at all, and neither produces an error - the request simply succeeds.
Blocking on async code with .Result or .Wait can deadlock when the awaited continuation needs the same SynchronizationContext that is blocked. In ASP.NET Core the common failure is thread-pool starvation; the fix is async all the way up.