Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 4 subjective questions Asp.Net MVC and Security

INT402 — Modern Web Programming Tools And Techniques 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define the middleware request pipeline in ASP.NET Core. Explain how an HTTP request and response travel through the pipeline.

  2. Question 2 of 20

    Distinguish between the Use, Run, and Map methods used to configure the ASP.NET Core request pipeline.

  3. Question 3 of 20

    Explain why the order of middleware components is important in an ASP.NET Core application. Give suitable examples.

  4. Question 4 of 20

    Describe any five commonly used built-in middleware components in ASP.NET Core and state the purpose of each.

  5. Question 5 of 20

    What is custom middleware? Describe the steps required to create and register a class-based custom middleware component in ASP.NET Core.

  6. Question 6 of 20

    Develop a custom ASP.NET Core middleware component that measures request-processing time. Explain its operation and registration.

  7. Question 7 of 20

    Define Dependency Injection (DI). Explain the roles of service registration, the service container, and service resolution in ASP.NET Core.

  8. Question 8 of 20

    Compare the Transient, Scoped, and Singleton service lifetimes in ASP.NET Core. Give an appropriate use case for each.

  9. Question 9 of 20

    Explain how to implement constructor-based dependency injection in an ASP.NET Core MVC controller with a suitable example.

  10. Question 10 of 20

    Discuss common dependency-injection mistakes in ASP.NET Core, including the service locator pattern, captive dependencies, and incorrect disposal.

  11. Question 11 of 20

    What is the Code First approach in Entity Framework Core? Describe the complete process for creating a database from model classes.

  12. Question 12 of 20

    Explain the purpose of DbContext, DbSet<TEntity>, connection strings, and database providers in an Entity Framework Core application.

  13. Question 13 of 20

    Describe Entity Framework Core migrations. How are migrations created, applied, rolled back, and maintained in a team project?

  14. Question 14 of 20

    What is the Database First approach in Entity Framework Core? Explain how an existing database can be reverse-engineered into an ASP.NET Core application.

  15. Question 15 of 20

    Compare the Code First and Database First approaches. State the advantages, limitations, and suitable use cases of each.

  16. Question 16 of 20

    Explain how entity relationships are represented in Entity Framework Core. Discuss one-to-one, one-to-many, and many-to-many relationships.

  17. Question 17 of 20

    Distinguish between authentication and authorization in a web application. Explain how they are related.

  18. Question 18 of 20

    Describe cookie-based authentication and token-based authentication in ASP.NET Core. Compare their typical uses and security considerations.

  19. Question 19 of 20

    Explain role-based, claims-based, and policy-based authorization in ASP.NET Core. Provide a suitable scenario for each.

  20. Question 20 of 20

    Design a secure authentication and authorization flow for an ASP.NET Core MVC application. Include service configuration, middleware order, access control, and major security precautions.

That's unit 4

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.