Skip to content
codinganthem

.NET and ASP.NET Core skill check

Test your ASP.NET Core: the middleware pipeline, dependency injection lifetimes, configuration, Entity Framework Core, Web API design, and authentication.

15

Questions

11 min

Timer can't pause

Multiple choice

.NET 8

Choose a level

Topics

  • Middleware pipeline
  • Dependency injection
  • Configuration
  • Entity Framework Core
  • Web API design
  • Authentication
  • Logging
  • Performance

Do

Use scratch paper or a notepad to work things out. Skip a question and come back to it later.

Don't

Look up answers during the check. Open the check in more than one tab or window.

Easy · 15 questions · 11 min

By starting, you agree to the Terms and Privacy Policy.

Start practice

Practice checks each answer as you go, with an explanation. The exam is checked when you submit; 9 of 15 passes and earns a certificate.

Checking your levels…

Certificates come from the certified exam: pass with 9 of 15 while signed in. View a sample certificate.

Sample .NET and ASP.NET Core questions with answers

These are never used in a check, so seeing their answers here won't give anything away.

  1. Question 1 · Easy · Middleware pipeline

    In an ASP.NET Core application, what is the effect of ordering app.UseAuthorization() before app.UseAuthentication() in the middleware pipeline?
    1. A.Authorization checks evaluate an unauthenticated user identity because authentication has not run yet.
    2. B.ASP.NET Core automatically reorders the middleware registrations internally at runtime to ensure authentication runs first.
    3. C.An InvalidOperationException is thrown when building the WebApplication instance during startup.
    4. D.The application fails to compile because middleware extension methods enforce execution order at build time.
    Show answer

    A. Authorization checks evaluate an unauthenticated user identity because authentication has not run yet.

    Middleware executes in the exact order it is registered. If UseAuthorization() is placed before UseAuthentication(), authorization policies run against an unpopulated HttpContext.User, causing requests requiring authentication to fail or behave incorrectly.
  2. Question 2 · Easy · Dependency injection

    Which service lifetime creates a new instance of a dependency each time it is requested from the dependency injection container?
    1. A.Singleton
    2. B.Transient
    3. C.Pooled
    4. D.Scoped
    Show answer

    B. Transient

    Transient services are created every time they are requested from the container. Scoped services are created once per client request (or scope), and Singleton services are created once across the application.
  3. Question 3 · Moderate · Configuration

    In ASP.NET Core, which configuration provider has the highest default precedence when using WebApplication.CreateBuilder(args)?
    1. A.appsettings.{Environment}.json
    2. B.Non-environment-specific appsettings.json
    3. C.Command-line arguments
    4. D.Environment variables
    Show answer

    C. Command-line arguments

    The default configuration order adds appsettings.json, then appsettings.{Environment}.json, then User Secrets (in Development), then Environment variables, and finally Command-line arguments as the highest precedence.
  4. Question 4 · Advanced · Entity Framework Core

    In EF Core 8, when using AsSplitQuery() on a LINQ query that loads a principal entity with multiple collection navigations, what is the primary consistency risk compared to a single query join?
    1. A.Database deadlocks automatically occur because EF Core holds exclusive row locks open across all split query round-trips.
    2. B.EF Core disables identity resolution for split queries, resulting in duplicate entity instances even within the same DbContext.
    3. C.Split queries execute inside individual implicit transactions that cause transaction escalation and force server-wide table locks.
    4. D.Concurrent updates between the execution of the split SQL queries can cause tearing, leading to inconsistent or corrupted combined results.
    Show answer

    D. Concurrent updates between the execution of the split SQL queries can cause tearing, leading to inconsistent or corrupted combined results.

    Because AsSplitQuery executes multiple independent SQL SELECT statements, if data is modified concurrently between those statements without a serializable/snapshot transaction, the queries can read different states of the database (data tearing), resulting in inconsistent aggregated objects.

How scoring and certificates work

  • Each check has 15 multiple-choice questions with one correct answer, and one timer for the whole check. A question you leave unanswered scores nothing.
  • Practice is free without an account and shows whether each answer is right as you go, with an explanation.
  • The certified exam is scored when you submit. 60% passes, which is 9 of 15. Easy unlocks Moderate, and Moderate unlocks Advanced.
  • Passing the exam while signed in earns a free certificate, valid for one year, with its own verification page. See a sample certificate.

Free tools for .NET and ASP.NET Core: JWT Decoder, HTTP Status Codes, JSON Formatter