ASP.NET Core vs Classic Framework: Key Differences Quiz Quiz

Explore core concepts and important distinctions between ASP.NET Core and the traditional framework in this beginner-friendly quiz, designed to help you recognize architecture, compatibility, and major feature changes. Ideal for learners aiming to understand modern web development platforms and compare them clearly.

  1. Cross-Platform Compatibility

    Which of the following statements accurately reflects ASP.NET Core's cross-platform capabilities compared to the classic framework?

    1. ASP.NET Core requires a proprietary device to function.
    2. ASP.NET Core can run on Windows, Linux, and macOS.
    3. ASP.NET Core is available only as a mobile app.
    4. ASP.NET Core is limited to Windows operating systems only.

    Explanation: ASP.NET Core supports deployment on Windows, Linux, and macOS, making it truly cross-platform. The classic framework is limited to Windows. The options about mobile apps or proprietary devices are incorrect because ASP.NET Core is designed mainly for web applications. The 'Windows only' option refers to the older framework, not Core.

  2. Open Source Nature

    In what way does ASP.NET Core differ from the classic framework regarding open-source availability?

    1. Neither version supports open-source licensing.
    2. Both are completely closed-source.
    3. ASP.NET Core is fully open-source, unlike the classic framework.
    4. Open-source code is exclusive to the classic version.

    Explanation: The design and source code of ASP.NET Core are open for community contributions, whereas the classic framework is closed source. The statement that both are closed-source is incorrect. Classic is not open-source and the last option is false since ASP.NET Core embraces open-source principles.

  3. Dependency Injection

    Which feature is natively integrated into ASP.NET Core, unlike the classic framework, to help manage object dependencies?

    1. Static configuration files only
    2. Direct editing of the runtime environment
    3. No support for dependency injection
    4. Built-in dependency injection

    Explanation: ASP.NET Core has built-in dependency injection, making it easier to manage services and object lifetimes. In the classic framework, dependency injection must be added through external libraries. The static files and 'no support' options ignore ASP.NET Core's important functionality, and 'direct editing of the runtime' is not related to dependency management.

  4. Project Structure Format

    What is a distinguishing difference in project file formats between ASP.NET Core and the classic framework?

    1. ASP.NET Core relies on verbose XML-based .vbproj files.
    2. Classic framework uses JSON project files by default.
    3. ASP.NET Core uses lightweight .csproj files with minimal markup.
    4. ASP.NET Core only recognizes config.txt for projects.

    Explanation: ASP.NET Core uses a simplified .csproj format, making project files easier to read and manage. Classic uses more detailed and complex .csproj or .vbproj files with extensive XML. JSON project files and config.txt are not standard for project structure in either framework.

  5. Hosting Model

    How does the hosting model differ in ASP.NET Core when compared to the classic framework?

    1. Both frameworks only support desktop application hosting.
    2. ASP.NET Core allows self-hosting via internal web servers.
    3. Classic framework is designed for self-hosting only.
    4. ASP.NET Core requires external application servers exclusively.

    Explanation: ASP.NET Core can use an internal web server to self-host applications, increasing deployment flexibility. The classic framework expects apps to run under a dedicated web server and lacks native self-host support. The desktop application reference is irrelevant, and ASP.NET Core does not require only external servers.

  6. Configuration Approach

    Which statement best describes how configuration is managed differently in ASP.NET Core compared to the classic framework?

    1. ASP.NET Core limits configuration to only app.config.
    2. ASP.NET Core supports flexible configuration sources beyond XML files.
    3. Classic framework allows only JSON-based configurations.
    4. Classic framework uses a strictly code-only configuration.

    Explanation: ASP.NET Core can use various sources for configurations, such as JSON, environment variables, and command-line arguments. The classic framework primarily relies on XML files. The claim about code-only configuration and JSON-only configuration for the classic version is false.

  7. Web Server Choices

    What is a key server-related difference between ASP.NET Core and the classic framework?

    1. ASP.NET Core is limited to built-in legacy web servers.
    2. Classic framework can run natively on Linux servers without alteration.
    3. ASP.NET Core can run on multiple web servers like Kestrel and other servers.
    4. Classic framework supports deployment to mobile devices only.

    Explanation: ASP.NET Core is designed to work with various web servers, including Kestrel, increasing its hosting versatility. The classic framework does not natively support Linux servers. ASP.NET Core is not restricted to legacy servers or mobile-only environments.

  8. API and MVC Unification

    In ASP.NET Core, what is significant about how MVC and API controllers are handled compared to the classic framework?

    1. MVC and API controller patterns are unified into a single framework.
    2. Only classic framework permits the use of both APIs and MVC together.
    3. API controllers require separate hosting from MVC controllers.
    4. ASP.NET Core does not support MVC or API patterns.

    Explanation: ASP.NET Core integrates MVC and API handling, so developers use one set of conventions for both. The classic framework keeps MVC and API in separate infrastructures. The distractors wrongly describe hosting requirements or incorrectly claim that ASP.NET Core lacks these features.

  9. Static File Handling

    How does static file serving differ between ASP.NET Core and the classic framework by default?

    1. Classic framework requires external tools for static file delivery.
    2. ASP.NET Core does not serve static files unless explicitly enabled.
    3. ASP.NET Core serves all static files automatically without configuration.
    4. Classic framework blocks all static content permanently.

    Explanation: In ASP.NET Core, developers must actively enable static file middleware, making static file serving opt-in for added security. The classic framework usually serves static files by default. The claim about permanent blocking and requiring external tools is inaccurate.

  10. Compatibility with Existing Applications

    What should developers consider regarding compatibility when migrating a classic framework app to ASP.NET Core?

    1. Code changes are often necessary due to differences in APIs and supported features.
    2. No compatibility tools exist for helping with the transition.
    3. Migration is always seamless with no code alterations needed.
    4. ASP.NET Core projects can simply import classic binary files without issues.

    Explanation: Migrating to ASP.NET Core usually requires adapting code because of API changes and removed features. In most cases, direct import or binary sharing does not work due to incompatibility. Compatibility tools do exist to assist, and migration is rarely completely seamless.