You are developing a Web application for Domain.com’s intranet Web site. You want to implement a login page that authenticates users against their Active Directory user accounts. However, no all pages will require authentication. You also want users to be able to personalize the Web pages and save their personalization settings to the CKWebUsers database. You need to configure the Web application’s Web.config file to meet these requirements.
What code segment should you use?
A.
<AnonymousIdentification Enabled="True" />
<Authentication Mode="Windows" />
B.
<AnonymousIdentification Enabled="False" />
<Authentication Mode="Forms" />
C.
<AnonymousIdentification Enabled="True" />
<Authentication Mode="Forms" />
D.
<AnonymousIdentification Enabled="False" />
<Authentication Mode="Windows" />
Explanation:
You should implement Forms Authentication as Forms Authentication uses a login page to authenticate users against their Microsoft Windows domain user accounts in Active Directory. You also need to enable anonymous identification as it allows ASP.NET to remember users without requiring them to be authenticated. This allows you to save and retrieve personalization settings for the users.Incorrect Answers:
A: Windows Authentication requires that users have a Microsoft Windows domain user account in Active Directory. However, Windows Authentication does not make use of a login page. Instead, the domain user account is passed through IIS to the Web application.
B: You need to enable anonymous identification as it allows ASP.NET to remember users without requiring them to be authenticated. This allows you to save and retrieve personalization settings for the users.
C: Windows Authentication requires that users have a Microsoft Windows domain user account in Active Directory. However, Windows Authentication does not make use of a login page. Instead, the domain user account is passed through IIS to the Web application. Furthermore, you also need to enable anonymous identification as it allows ASP.NET to remember users without requiring them to be authenticated. This allows you to save and retrieve personalization settings for the users.