Configuring the WindowsTokenRoleProvider
When you use the WindowsTokenRoleProvider
, roles correspond to Microsoft Windows groups. You must enable Windows authentication when using the WindowsTokenRoleProvider
. You cannot use Forms authentication or ASP.NET Membership with the WindowsTokenRoleProvider
.
The configuration file in Listing 27.30 configures the WindowsTokenRoleProvider
as the default provider.
Listing 27.30. Web.Config
The page in Listing 27.31 contains a LoginView
control. The LoginView
control displays different content to the members of the Windows Administrators group than it displays to everyone else (see Figure 27.14).
Figure ...
Get ASP.NET 4 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.