ASP.NET Core

ASP.NET Core

Test your ASP.NET knowledge with free quizzes on MyCodeSkills covering core concepts.


  1. What is the default entry point of an ASP.NET Core application?

    • Main() method
    • Startup.cs constructor
    • ConfigureServices()
    • Program.cs class
  2. Which file is used to configure middleware components?

    • appsettings.json
    • Startup.cs
    • Program.cs
    • launchSettings.json
  3. What is the main function of Middleware in ASP.NET Core?

    • Serve static files
    • Handle exceptions
    • Handle requests/responses
    • Load assemblies
  4. Where are static files typically placed in an ASP.NET Core app?

    • Content
    • Assets
    • wwwroot
    • Public
  5. Which method is used to add MVC services in Startup.cs?

    • AddRazorPages()
    • AddControllers()
    • AddMvc()
    • AddServices()
  6. What is Middleware in ASP.NET Core?

    • A way to handle database migrations
    • A method to serve static files
    • Software that handles requests/responses in the pipeline
    • A deployment mechanism
  7. What is the main purpose of Dependency Injection in ASP.NET Core?

    • To manage database connections
    • To inject code dynamically
    • To resolve object dependencies
    • To create log files
  8. Which interface is used for logging in ASP.NET Core?

    • IHostingLogger
    • ILoggerFactory
    • ILogWriter
    • ILogger
  9. What is the default ORM used in ASP.NET Core for database access?

    • NHibernate
    • ADO.NET
    • Entity Framework Core
    • Dapper
  10. Which attribute is used for model validation in ASP.NET Core?

    • [HttpPost]
    • [Validate]
    • [Required]
    • [Bind]
  11. What is the purpose of the IHostedService interface in ASP.NET Core?

    • Manage cookies
    • Create UI elements
    • Run background tasks
    • Serve static files
  12. Which pattern is used to separate read and write operations in ASP.NET Core?

    • MVC
    • CQRS
    • Singleton
    • Repository
  13. What does the UseMiddleware<T>() method do in ASP.NET Core?

    • Registers a controller
    • Adds routing
    • Adds custom middleware
    • Injects dependencies
  14. What fallback transport does SignalR use if WebSockets are not available?

    • TCP
    • UDP
    • Server-Sent Events
    • FTP
  15. What is the main purpose of the MediatR library in ASP.NET Core?

    • Database backup
    • Logging
    • Decoupling request handling logic
    • Email services