• 6 hours
  • Medium

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 12/20/19

Manage Access to Your .NET MVC Web Application

Log in or subscribe for free to enjoy all this course has to offer!

Evaluated skills

  • Manage access to your .NET MVC web application
  • Question 1

    Which method in the Startup.cs file contains the code used to customize options for Asp.NET Core Identity?

    • Startup

    • Configure

    • ConfigureServices

    • Initialize

    • Dispose

  • Question 2

    Which of the following statements correctly adds a database context for the default connection string using the  AppDbContext  class?

    • services.AddDbContext<DbContext>(options => options.UseSqlServer(
      Configuration.GetConnectionString("DefaultConnection")));
    • services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer(GetConnectionString("DefaultConnection")));
    • services.AddDbContext<AppDbContext>(options => options.UseSqlServer(
      GetConnectionString("DefaultConnection")));
    • services.AddDbContext<AppDbContext>(options => options.UseSqlServer(
      Configuration.GetConnectionString("DefaultConnection")));
    • None of the above.

  • Question 3

    Which of the following statements enables ASP.NET Core Identity in the  Configure  method of Startup.cs?

    • app.UseAuthentication();
    • app.EnableIdentity();
    • app.enableIdentity();
    • app.UseIdentity();
    • app.EnableAuthentication();